This feature is not Baseline because it does not work in some of the most widely-used browsers.
The allowFullscreen property of the HTMLIFrameElement interface is a boolean value that reflects the allowfullscreen attribute of the <iframe> element, indicating whether to allow the iframe's contents to use requestFullscreen().
Note: This property is considered a legacy property. Use allow="fullscreen" and HTMLIFrameElement.allow instead.
A boolean value.
<iframe id="el" allowfullscreen></iframe>
const el = document.getElementById("el");
console.log(el.allowFullscreen); // Output: true
| Specification |
|---|
| HTML> # dom-iframe-allowfullscreen> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
allowFullscreen |
38 | 12 | 229–18 | 25 | 10.1 | 38 | 229–18 | 25 | 12["Only available on iPad, not on iPhone.", "Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games."] |
3.0 | 38 | 12["Only available on iPad, not on iPhone.", "Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games."] |
Element.requestFullscreen()fullscreen Permissions Policy directive
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/allowFullscreen