summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLCanvasElement.idl
blob: cdf9f2281c2a808181fc7b0c1fd51703fe89df58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#import <HTML/CanvasRenderingContext2D.idl>
#import <HTML/HTMLElement.idl>
#import <WebGL/WebGLRenderingContext.idl>

typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;

// https://html.spec.whatwg.org/multipage/semantics.html#htmlcanvaselement
[Exposed=Window]
interface HTMLCanvasElement : HTMLElement {

    RenderingContext? getContext(DOMString contextId, optional any options = null);
    attribute unsigned long width;
    attribute unsigned long height;

    USVString toDataURL(optional DOMString type = "image/png", optional double quality);

};