HTMLIFrameElement: allowFullscreen property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("HTML DOM")}}
The **allowFullscreen** property of the {{domxref("HTMLIFrameElement")}} interface is a boolean value that reflects the allowfullscreen attribute of the {{HTMLElement("iframe")}} element, indicating whether to allow the iframe's contents to use {{domxref("Element.requestFullscreen", "requestFullscreen()")}}.
توجه: This property is considered a legacy property. Use allow="fullscreen" and {{domxref("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: trueSpecifications
{{Specifications}}
Browser compatibility
{{Compat}}
See also
- Fullscreen API
- {{domxref("Element.requestFullscreen()")}}
- Permissions Policy
- {{httpheader("Permissions-Policy/fullscreen", "fullscreen")}} Permissions Policy directive