Definition
HTML Standard defines OffscreenCanvas
[Exposed=(Window,Worker), Transferable]
interface OffscreenCanvas : EventTarget {
constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height);
attribute [EnforceRange] unsigned long long width;
attribute [EnforceRange] unsigned long long height;
OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId, optional any options = null);
ImageBitmap transferToImageBitmap();
Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {});
attribute EventHandler oncontextlost;
attribute EventHandler oncontextrestored;
};
Methods and attributes that return objects implementing OffscreenCanvas
Referring IDL interfaces/dictionaries
Referring specifications
- WebGL Specification refers to
OffscreenCanvas
- WebGPU refers to
OffscreenCanvas