HTMLIFrameElement:allowFullscreen 属性
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
HTMLIFrameElement
接口的 allowFullscreen
属性是一个反映了 <iframe>
元素的 allowfullscreen
属性的布尔值,它表示 iframe 的内容是否允许使用 requestFullscreen()
。
备注:
此属性被视为遗留属性。请改用 allow="fullscreen"
和 HTMLIFrameElement.allow
。
值
一个布尔值。
示例
html
<iframe id="el" allowfullscreen></iframe>
js
const el = document.getElementById("el");
console.log(el.allowFullscreen); // 输出:true
规范
Specification |
---|
HTML # dom-iframe-allowfullscreen |
浏览器兼容性
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.