Permissions-Policy: fullscreen directive

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The HTTP Permissions-Policy header fullscreen directive controls whether the current document is allowed to use Element.requestFullscreen().

By default, top-level documents and their same-origin child frames can request and enter fullscreen mode. This directive allows or prevents cross-origin frames from using fullscreen mode. This includes same-origin frames.

Specifically, where a defined policy blocks use of this feature, requestFullscreen() calls will return a Promise that rejects with a TypeError.

Note: If both this directive (i.e., via the allow attribute) and the allowfullscreen attribute are present on an

iframe attributes can selectively enable features in certain frames, and not in others, even if those frames contain documents from the same origin.

Specifications

Specification
Fullscreen API
# permissions-policy-integration

Browser compatibility

See also