XRLayerEvent: XRLayerEvent() constructor
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
TheXRLayerEvent
constructor creates and returns a newXRLayerEvent
object. These events relate to a change of state of anXRLayer
object.
In this article
Syntax
js
new XRLayerEvent(type, options)
Parameters
Return value
A newXRLayer
object representing an object of thespecified type and configured as described by theeventInitDict
parameter.
Examples
>Creating a newXRLayerEvent
In this example, a newredraw
event is created for anXRQuadLayer
.
js
const redrawEvent = new XRLayerEvent("redraw", { layer: quadLayer,});quadLayer.dispatchEvent();
Specifications
Specification |
---|
WebXR Layers API Level 1> # dom-xrlayerevent-xrlayerevent> |
Browser compatibility
Loading…