You’re reading the English version of this content since no translation exists yet for this locale. Help us translate this article!
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The VRDisplayEvent
interface of the WebVR API represents represents the event object of WebVR-related events (see the list of WebVR window extensions).
Constructor
VRDisplayEvent.VRDisplayEvent()
- Creates a
VRDisplayEvent
object instance.
Properties
VRDisplayEvent
also inherits properties from its parent object, Event
.
VRDisplayEvent.display
Read only- The
VRDisplay
associated with this event. VRDisplayEvent.reason
Read only- A human-readable reason why the event was fired.
Examples
window.addEventListener('vrdisplaypresentchange', function(e) { console.log('Display ' + e.display.displayId + ' presentation has changed. Reason given: ' + e.reason + '.'); })
Specifications
Specification | Status | Comment |
---|---|---|
WebVR 1.1 The definition of 'VRDisplayEvent' in that specification. |
Draft | Initial definition |
Browser compatibility
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
VRDisplayEvent | Chrome No support No | Edge Full support Yes | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
VRDisplayEvent() constructor | Chrome No support No | Edge Full support Yes | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
display | Chrome No support No | Edge Full support 15 | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
reason | Chrome No support No | Edge Full support 15 | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- Deprecated. Not for use in new websites.
- Deprecated. Not for use in new websites.
- See implementation notes.
- See implementation notes.
- User must explicitly enable this feature.
- User must explicitly enable this feature.
See also
- WebVR API homepage
- MozVr.com — demos, downloads, and other resources from the Mozilla VR team.