HTMLIFrameElement: thuộc tính allowFullscreen
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Thuộc tính allowFullscreen của giao diện HTMLIFrameElement là một giá trị boolean phản ánh thuộc tính allowfullscreen của phần tử <iframe>, cho biết có cho phép nội dung của iframe sử dụng requestFullscreen() hay không.
Note:
Thuộc tính này được coi là một thuộc tính kế thừa. Hãy sử dụng allow="fullscreen" và HTMLIFrameElement.allow thay thế.
Giá trị
Một giá trị boolean.
Ví dụ
html
<iframe id="el" allowfullscreen></iframe>
js
const el = document.getElementById("el");
console.log(el.allowFullscreen); // Output: true
Đặc tả kỹ thuật
| Specification |
|---|
| HTML> # dom-iframe-allowfullscreen> |
Tương thích trình duyệt
Xem thêm
- Fullscreen API
Element.requestFullscreen()- Chính sách quyền
- Chỉ thị chính sách quyền
fullscreen