Window.onvrdisplayconnect

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The onvrdisplayconnect property of the Window interface represents an event handler that will run when a compatible VR display has been connected to the computer (when the vrdisplayconnect event fires).

The event object is of type VRDisplayEvent.

Syntax

window.onvrdisplayconnect = function() { ... };

Examples

window.onvrdisplayconnect = function() {
  info.textContent = 'Display connected.';
};

Specifications

Specification Status Comment
WebVR 1.1
The definition of 'onvrdisplayconnect' in that specification.
Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No1 ?

634

555

No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? Yes2 3 ?55 No No Yes6

1. This feature is behind the WebVR preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.

2. Chrome for Android 56 supports only Google Daydream View.

3. Chrome for Android 57 adds support for Google Cardboard.

4. Only Windows and macOS support is enabled.

5. Only Windows support is enabled.

6. Supported on Samsung Internet for GearVR.

See also

Document Tags and Contributors

Contributors to this page: wbamberg, chrisdavidmills, mattwojo
Last updated by: wbamberg,