Web/API/XRReferenceSpaceEventInit/referenceSpace

From Get docs

Secure contextThis 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 APIThe definition of 'XRReferenceSpaceEventInit.referenceSpace' in that specification. Working Draft Initial definition.

Browser compatibility

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