HTMLCanvasElement.idl 807 B

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