WebXR Device API
The WebXR Device API's
XRSessionEvent() constructor creates and returns a new
XRSessionEvent object. These objects represent events announcing
state changes in an XRSession representing an augmented or virtual
reality session.
Syntax
new XRSessionEvent(type, options)
Parameters
type- : A string with the name of the event.
It is case-sensitive and browsers set it to
endorvisibilitychange.
- : A string with the name of the event.
It is case-sensitive and browsers set it to
options- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
session- : The XRSession to which the event is to be delivered.
- : An object that, in addition of the properties defined in Event/Event, can have the following properties:
Return value
A new XRSessionEvent object representing an object of the
specified type and configured as described by the options parameter.
Examples
See XRSessionEvent for example code.
Specifications
Browser compatibility
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
