W3cubDocs

/DOM

window.onvrdisplaydisconnect

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

The onvrdisplaydisconnect event handler property of the Window interface is called when a compatible VR display has been disconnected from the computer (when the vrdisplaydisconnect event fires).

The event object is of type VRDisplayEvent.

Syntax

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

Examples

window.onvrdisplaydisconnect = function() {
  info.textContent = 'Display disconnected.';
};

Specifications

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

Browser compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support No
Disabled
No
Disabled
Disabled This feature is behind the WebVR preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.
? 63
63
Only Windows and macOS support is enabled.
55
Only Windows support is enabled.
No No No
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support ? 56
56
Chrome for Android 56 supports only Google Daydream View.
Chrome for Android 57 adds support for Google Cardboard.
? 55 No No Yes
Yes
Supported on Samsung Internet for GearVR.

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/window/onvrdisplaydisconnect