2023-11-08 15:04:56 -03:00
|
|
|
#import <FileAPI/Blob.idl>
|
2022-02-15 16:10:51 -03:00
|
|
|
#import <HTML/CanvasRenderingContext2D.idl>
|
|
|
|
|
#import <HTML/HTMLElement.idl>
|
2022-06-04 00:22:42 -03:00
|
|
|
#import <WebGL/WebGLRenderingContext.idl>
|
2024-12-06 00:56:18 -03:00
|
|
|
#import <WebGL/WebGL2RenderingContext.idl>
|
2022-06-04 00:22:42 -03:00
|
|
|
|
2024-12-06 00:56:18 -03:00
|
|
|
typedef (CanvasRenderingContext2D or WebGLRenderingContext or WebGL2RenderingContext) RenderingContext;
|
2022-02-15 16:10:51 -03:00
|
|
|
|
2022-10-07 19:45:09 -03:00
|
|
|
// https://html.spec.whatwg.org/multipage/semantics.html#htmlcanvaselement
|
2023-09-03 00:58:55 -03:00
|
|
|
[Exposed=Window]
|
2020-06-21 10:37:13 -03:00
|
|
|
interface HTMLCanvasElement : HTMLElement {
|
|
|
|
|
|
2023-03-23 04:48:52 -03:00
|
|
|
[HTMLConstructor] constructor();
|
|
|
|
|
|
2023-02-28 22:45:18 -03:00
|
|
|
[CEReactions] attribute unsigned long width;
|
|
|
|
|
[CEReactions] attribute unsigned long height;
|
2020-06-21 10:37:13 -03:00
|
|
|
|
2023-10-25 12:26:24 -03:00
|
|
|
RenderingContext? getContext(DOMString contextId, optional any options = null);
|
|
|
|
|
|
2024-11-08 05:13:54 -03:00
|
|
|
USVString toDataURL(optional DOMString type = "image/png", optional any quality);
|
|
|
|
|
undefined toBlob(BlobCallback _callback, optional DOMString type = "image/png", optional any quality);
|
2023-10-25 12:26:24 -03:00
|
|
|
|
2020-12-09 18:26:42 -03:00
|
|
|
};
|
2023-08-02 20:29:31 -03:00
|
|
|
|
|
|
|
|
callback BlobCallback = undefined (Blob? blob);
|