XRViewport.height

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The read-only XRViewport property height specifies the height, in pixels, of the viewport onto the drawing surface within which the WebXR view is to be rendered. Along with width and the origin point given by x and y, this defines the area within which rendered content will be drawn.

Syntax

height = xrViewport.height;

Value

The viewport's height in pixels.

Examples

See the main XRViewport page for examples.

Specifications

Specification Status Comment
WebXR Device API
The definition of 'XRViewport.height' in that specification.
Working Draft Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
heightChrome Full support 79Edge Full support 79Firefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android Full support 79Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support 11.2

Legend

Full support
Full support
No support
No support