OffscreenCanvas
Generated from idl/canvas.webidl when the site was built at 7aa23e2.
OffscreenCanvas is an interface in idl/canvas.webidl, inheriting EventTarget, exposed in Window, Worker. What it does is on MDN; this page says what niso has of it.
Status
Section titled “Status”The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).
| Feature | On the web | In niso | Members |
|---|---|---|---|
| Offscreen canvas | Widely available | Partial 69% 1069 of 1545 subtests pass | 7 |
Members
Section titled “Members”constructor
Section titled “constructor”constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height);int32_t niso_offscreen_canvas_new(niso_dom* dom, uint64_t width, uint64_t height, niso_handle* out);attribute unsigned long long width;int32_t niso_offscreen_canvas_get_width(niso_dom* dom, niso_handle self, uint64_t* out);int32_t niso_offscreen_canvas_set_width(niso_dom* dom, niso_handle self, uint64_t value);[EnforceRange] on the setters is the glue’s.
height
Section titled “height”attribute unsigned long long height;int32_t niso_offscreen_canvas_get_height(niso_dom* dom, niso_handle self, uint64_t* out);int32_t niso_offscreen_canvas_set_height(niso_dom* dom, niso_handle self, uint64_t value);getContext()
Section titled “getContext()”[NisoGlue] OffscreenCanvasRenderingContext2D? getContext(DOMString contextId, optional any options = null);context2d()
Section titled “context2d()”[NisoInternal] OffscreenCanvasRenderingContext2D context2d(boolean alpha);int32_t niso_offscreen_canvas_context2d(niso_dom* dom, niso_handle self, bool alpha, niso_handle* out);transferToImageBitmap()
Section titled “transferToImageBitmap()”ImageBitmap transferToImageBitmap();int32_t niso_offscreen_canvas_transfer_to_image_bitmap(niso_dom* dom, niso_handle self, niso_handle* out);convertToBlob()
Section titled “convertToBlob()”[NisoGlue] Promise<Blob> convertToBlob(optional any options = null);encodePng()
Section titled “encodePng()”[NisoInternal] ArrayBuffer encodePng();int32_t niso_offscreen_canvas_encode_png(niso_dom* dom, niso_handle self, niso_bytes* out);Not in niso yet
Section titled “Not in niso yet”Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.
clearElementGeometry(HTML-in-canvas)contextlost event(contextlost and contextrestored)contextrestored event(contextlost and contextrestored)getElementImageDefaultSize(HTML-in-canvas)updateElementGeometry(HTML-in-canvas)