HTMLCanvasElement.idl 809 B

1234567891011121314151617181920212223
  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. [CEReactions] attribute unsigned long width;
  10. [CEReactions] attribute unsigned long height;
  11. RenderingContext? getContext(DOMString contextId, optional any options = null);
  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);