HTMLCanvasElement.idl 899 B

12345678910111213141516171819202122232425
  1. #import <FileAPI/Blob.idl>
  2. #import <HTML/CanvasRenderingContext2D.idl>
  3. #import <HTML/HTMLElement.idl>
  4. #import <WebGL/WebGLRenderingContext.idl>
  5. #import <WebGL/WebGL2RenderingContext.idl>
  6. typedef (CanvasRenderingContext2D or WebGLRenderingContext or WebGL2RenderingContext) RenderingContext;
  7. // https://html.spec.whatwg.org/multipage/semantics.html#htmlcanvaselement
  8. [Exposed=Window]
  9. interface HTMLCanvasElement : HTMLElement {
  10. [HTMLConstructor] constructor();
  11. [CEReactions] attribute unsigned long width;
  12. [CEReactions] attribute unsigned long height;
  13. RenderingContext? getContext(DOMString contextId, optional any options = null);
  14. USVString toDataURL(optional DOMString type = "image/png", optional any quality);
  15. undefined toBlob(BlobCallback _callback, optional DOMString type = "image/png", optional any quality);
  16. };
  17. callback BlobCallback = undefined (Blob? blob);