HTMLIFrameElement: allow property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
The allow
property of the HTMLIFrameElement
interface indicates the Permissions Policy specified for this element. The policy defines what features are available to the
element (for example, access to the
microphone
, camera
, battery
, web-share
, etc.) based on the origin of the request.
The Permissions Policy specified by the allow
attribute implements a further restriction on top of the policy specified in the Permissions-Policy
header. It doesn't replace it.
See 's Permissions Policy syntax for more details.
Value
A string indicates the Permissions Policy specified for this element, each policy must be separated by space.
Examples
const el = document.getElementById("el");
console.log(el.allow); // Output: "geolocation 'self' https://a.example.com https://b.example.com; fullscreen 'none'"
See Permissions Policy in element for more available examples.
Specifications
Specification |
---|
HTML # dom-iframe-allow |