Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The XRReferenceSpaceEventInit property referenceSpace is used to establish the value of a newly-constructed XRReferenceSpaceEvent object when calling the XRReferenceSpaceEvent() constructor.
Syntax
let eventInitDict = {
referenceSpace: xrReferenceSpace,
transform: xrRigidTransform
});
Value
An XRReferenceSpace indicating the source of the event.
Examples
This simple snippet calls the constructor to create a new reference space event of type reset.
let refSpaceEvent = new XRReferenceSpaceEvent("reset", {
referenceSpace: myRefSpace,
transform: myTransform
});
Specifications
| Specification | Status | Comment |
|---|---|---|
| WebXR Device API The definition of 'XRReferenceSpaceEventInit.referenceSpace' 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.
No compatibility data found. Please contribute data for "api.XRReferenceSpaceEventInit.referenceSpace" (depth: 1) to the MDN compatibility data repository.
