Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The XRReferenceSpaceEvent()
constructor is used to create a new XRReferenceSpaceEvent
object, which represents an event regarding the state of a WebXR reference space object, XRReferenceSpace
.
Currently, only the reset
event is defined using this type.
Syntax
let refSpaceEvent = new XRReferenceSpaceEvent(type, eventInitDict);
Parameters
type
- A
DOMString
indicating the event type which has occurred. Currently, this is alwaysreset
. eventInitDict
-
An object based on the
XRReferenceSpaceEventInit
dictionary, containing data used to initialize the new event object. The properties of this object are:referenceSpace
- The
XRReferenceSpace
from which the event originated. transform
- An
XRRigidTransform
which maps the old coordinate system (from before the changes indicated by this event) to the new coordiante system.
Return value
A new XRReferenceSpaceEvent
object, initialized as defined by the input parameters.
Specifications
Specification | Status | Comment |
---|---|---|
WebXR Device API The definition of 'XRReferenceSpaceEvent()' in that specification. |
Working Draft | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
XRReferenceSpaceEvent() constructor | Chrome Full support 79 | Edge Full support 79 | Firefox No support No | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android Full support 79 | Firefox Android No support No | Opera Android No support No | Safari iOS No support No | Samsung Internet Android Full support 11.2 |
Legend
- Full support
- Full support
- No support
- No support