This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

OffscreenCanvas.height

Baseline 2023
Newly available

Since ⁨March 2023⁩, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.

height 속성은 OffscreenCanvas 객체에 할당된 높이를 반환합니다.

구문

예제

새로운 offscreen 캔버스를 생성하고 높이를 설정하거나 반환합니다.

js
const offscreen = new OffscreenCanvas(256, 256);
offscreen.height; // 256
offscreen.height = 512;

명세서

Specification
HTML
# dom-offscreencanvas-height-dev

브라우저 호환성

더 보기