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 Standard # dom-iframe-allowfullscreen |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
allowFullscreen |
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.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- Fullscreen API
Element.requestFullscreen()
- Permissions Policy
fullscreen
Permissions Policy directive