XRLayerEvent: layer property
WebXR Device API
WebXR Device API
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 (e.layer instanceof XRQuadLayer) {
// redraw quad layer
}
});
Specifications
Browser compatibility
See also
- XRLayer