Skip to content

Commit bc96697

Browse files
Manishearthtoji
authored andcommitted
Gate xrCompatible on permissions policy
1 parent 7c7fb82 commit bc96697

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.bs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,8 @@ When a user agent implements this specification it MUST set a <dfn>XR compatible
20762076

20772077
Note: This flag introduces slow synchronous behavior and is discouraged. Consider calling {{WebGLRenderingContextBase/makeXRCompatible()}} instead for an asynchronous solution.
20782078

2079-
The [=XR compatible=] boolean can be set either at context creation time or after context creation, potentially incurring a context loss. To set the [=XR compatible=] boolean at context creation time, the {{xrCompatible}} context creation attribute must be set to <code>true</code> when requesting a WebGL context.
2079+
The [=XR compatible=] boolean can be set either at context creation time or after context creation, potentially incurring a context loss. To set the [=XR compatible=] boolean at context creation time, the {{xrCompatible}} context creation attribute must be set to <code>true</code> when requesting a WebGL context. If the requesting document's origin is not allowed to use the "xr-spatial-tracking" [[#permissions-policy|permissions policy]], {{xrCompatible}} has no effect.
2080+
20802081

20812082
The {{WebGLContextAttributes/xrCompatible}} flag on {{WebGLContextAttributes}}, if <code>true</code>, affects context creation by requesting the user-agent [=create the WebGL context=] using a [=compatible graphics adapter=] for the [=immersive XR device=]. If the user agent succeeds in this, the created context's [=XR compatible=] boolean will be set to true. To obtain the [=immersive XR device=], [=ensure an immersive XR device is selected=] SHOULD be called.
20822083

0 commit comments

Comments
 (0)