Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The XRSessionEventInit dictionary's session property specifies the XRSession for which the event describes a state change.


let sessionEventInit = {
  session: xrSession
mySessionEvent = new XRSessionEvent(type, sessionEventInit);

mySessionEvent = new XRSessionEvent(type,
                 { session: XRSession });


An XRSession object indicating which WebXR session the event is referring to.


Specification Status Comment
WebXR Device API
The definition of 'XRSessionEventInit.session' in that specification.
Working Draft Initial definition.

Browser compatibility

No compatibility data found. Please contribute data for "api.XRSessionEventInit.session" (depth: 1) to the MDN compatibility data repository.