Window: vrdisplaydeactivate event

The vrdisplaydeactivate event of the WebVR API is fired when a VR display can no longer be presented to, for example if an HMD has gone into standby or sleep mode due to a period of inactivity.

Bubbles No
Cancelable No
Interface VRDisplayEvent
Event handler property onvrdisplaydeactivate

Examples

You can use the vrdisplaydeactivate event in an addEventListener method:

window.addEventListener('vrdisplaydeactivate', function() {
  info.textContent = 'Display deactivated.';
  reportDisplays();
});

Or use the onvrdisplaydeactivate event handler property:

window.onvrdisplaydeactivate = function() {
  info.textContent = 'Display deactivated.';
  reportDisplays();
};

Specifications

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

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
vrdisplaydeactivate event
Experimental
Chrome No support NoEdge No support NoFirefox Full support 55
Notes
Full support 55
Notes
Notes Windows support was enabled in Firefox 55.
Full support 64
Notes
Notes macOS support was enabled in Firefox 64.
IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 55Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.

See also