HTMLIFrameElement: allowFullscreen property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
TheallowFullscreen property of theHTMLIFrameElement interface is a boolean value that reflects theallowfullscreen attribute of the<iframe> element, indicating whether to allow the iframe's contents to userequestFullscreen().
Note:This property is considered a legacy property. Useallow="fullscreen" andHTMLIFrameElement.allow instead.
In this article
Value
A boolean value.
Examples
html
<iframe allowfullscreen></iframe>js
const el = document.getElementById("el");console.log(el.allowFullscreen); // Output: trueSpecifications
| Specification |
|---|
| HTML> # dom-iframe-allowfullscreen> |
Browser compatibility
See also
- Fullscreen API
Element.requestFullscreen()- Permissions Policy
fullscreenPermissions Policy directive