XRLayerEvent.layer

The layer property of the XRLayerEvent interface is a reference to the XRLayer which generated the event.

Value

An XRLayer.

Examples

Using the layer property

In this example, the layer property is used to obtain the XRLayer object that sent the event.

myLayer.addEventListener("redraw", e => {
  if (typeof e.layer === "XRQuadLayer") {
    // redraw quad layer
  }
});

Specifications

No specification found

No specification data found for api.XRLayerEvent.layer.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

No compatibility data found for api.XRLayerEvent.layer.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also