http permissions policy directive
Permissions-Policy: xr-spatial-tracking directive
Limited availability
The HTTP Permissions-Policy header xr-spatial-tracking directive controls whether the current document is allowed to use the WebXR Device API.
Specifically, where a defined policy blocks usage of this feature:
-
navigator.xr.isSessionSupported()andnavigator.xr.requestSession()calls will return aPromisethat rejects with aDOMExceptionof typeSecurityError. -
devicechangeevents are not fired on thenavigator.xrobject.
Syntax
Permissions-Policy: xr-spatial-tracking=<allowlist>;
<allowlist>- : A list of origins for which permission is granted to use the feature. See
Permissions-Policy> Syntax for more details.
- : A list of origins for which permission is granted to use the feature. See
Default policy
The default allowlist for xr-spatial-tracking is self.
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.