This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
The height
property returns and sets the height of an OffscreenCanvas
object.
SyntaxEdit
var pxl = offscreen.height; offscreen.height = pxl;
ExamplesEdit
Creating a new offscreen canvas and returning or setting the height of the offscreen canvas:
var offscreen = new OffscreenCanvas(256, 256);
offscreen.height; // 256
offscreen.height = 512;
SpecificationsEdit
Currently drafted as a proposal: OffscreenCanvas.
Browser compatibilityEdit
[1] This feature is behind a feature preference setting. In about:config, set gfx.offscreencanvas.enabled
to true
.
See alsoEdit
OffscreenCanvas
, the interface this property belongs to.