A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/OffscreenCanvas below:

OffscreenCanvas: OffscreenCanvas() constructor - Web APIs

OffscreenCanvas: OffscreenCanvas() constructor

Baseline 2023

Newly available

Note: This feature is available in Web Workers.

The OffscreenCanvas() constructor returns a newly instantiated OffscreenCanvas object.

Syntax
new OffscreenCanvas(width, height)
Parameters
width

The width of the offscreen canvas.

height

The height of the offscreen canvas.

Examples

This example creates a new offscreen canvas using the OffscreenCanvas() constructor. We then initialize a WebGL context on it using the getContext() method.

const offscreen = new OffscreenCanvas(256, 256);
const gl = offscreen.getContext("webgl");
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3