HTMLIFrameElement: allowFullscreen property

Limited availability

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.

Value

A boolean value.

Examples

html
<iframe id="el" allowfullscreen></iframe>
js
const el = document.getElementById("el");
console.log(el.allowFullscreen); // Output: true

Specifications

Specification
HTML
# dom-iframe-allowfullscreen

Browser compatibility

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
Chrome – Full support
Chrome 38 (Release date: 2014-10-07)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – No support
Firefox 9 – 17 (Release date: 2011-12-20)
altname
footnote Removed in 18 and later
altname Alternate name: mozAllowFullScreen
Firefox – Full support
Firefox 22 (Release date: 2013-06-25)
footnote Full support
Opera – Full support
Opera 25 (Release date: 2014-10-15)
footnote Full support
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 38 (Release date: 2014-10-08)
footnote Full support
Firefox for Android – No support
Firefox for Android 9 – 17 (Release date: 2011-12-21)
altname
footnote Removed in 18 and later
altname Alternate name: mozAllowFullScreen
Firefox for Android – Full support
Firefox for Android 22 (Release date: 2013-06-25)
footnote Full support
Opera Android – Full support
Opera Android 25 (Release date: 2014-10-16)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 12 (Release date: 2018-09-17)
footnote Partial support
footnote Only available on iPad, not on iPhone.
footnote Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Samsung Internet – Full support
Samsung Internet 3 (Release date: 2015-04-10)
footnote Full support
WebView Android – Full support
WebView Android 38 (Release date: 2014-10-08)
footnote Full support
WebView on iOS – Partial support
WebView on iOS 12 (Release date: 2018-09-17)
footnote Partial support
footnote Only available on iPad, not on iPhone.
footnote Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
Uses a non-standard name
Has more compatibility info.

See also