Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. HTMLIFrameElement
  4. allow

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.

Theallow property of theHTMLIFrameElement interface indicates thePermissions Policy specified for this<iframe> element. The policy defines what features are available to the<iframe> element (for example, access to themicrophone,camera,battery,web-share, etc.) based on the origin of the request.

The Permissions Policy specified by theallow attribute implements a further restriction on top of the policy specified in thePermissions-Policy header. It doesn't replace it.

See<iframe>'s Permissions Policy syntax for more details.

It reflects theallow attribute of the<iframe> element.

Value

A string indicates thePermissions Policy specified for this<iframe> element, each policy must be separated by space.

Examples

html
<iframe   src="https://example.com"  allow="geolocation 'self' https://a.example.com https://b.example.com; fullscreen 'none'"></iframe>
js
const el = document.getElementById("el");console.log(el.allow); // Output: "geolocation 'self' https://a.example.com https://b.example.com; fullscreen 'none'"

SeePermissions Policy in<iframe> element for more available examples.

Specifications

Specification
HTML
# dom-iframe-allow

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp