Window.onvrdisplayconnect

Experimental

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

BCD tables only load in the browser

See also