OffscreenCanvas.height
Baseline 2023Newly available
Since March 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
设置或者获取OffscreenCanvas
对象的高度。
语法
var pxl = offscreen.height; offscreen.height = pxl;
例子
创建一个新的离屏 canvas,获取或者设置离屏 canvas 的高度:
js
var offscreen = new OffscreenCanvas(256, 256);
offscreen.height; // 256
offscreen.height = 512;
规范
Specification |
---|
HTML Standard # dom-offscreencanvas-height-dev |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
height |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
另外参阅
OffscreenCanvas
, 此属性所属的接口。