这是 实验性技术
检查 浏览器兼容性表格 要小心谨慎在生产中使用这之前。

featurePolicy 只读特性在 HTMLIFrameElement interface returns the FeaturePolicy interface which provides a simple API for introspecting the feature policies applied to a specific frame.

句法

var policy = HTMLIFrameElement.featurePolicy
					

A FeaturePolicy object that can be used to inspect the Feature Policy settings applied to the frame.

规范

规范 状态 注释
Feature Policy 编者草案 初始定义。

浏览器兼容性

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. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
featurePolicy Chrome 74
74
Chrome Platform Status incorrectly describes this variable as document.policy . It was renamed in bug 917057 before being shipped in bug 703703 .
不支持 73 — 74 Disabled
Disabled From version 73 until version 74 (exclusive): this feature is behind the #enable-experimental-productivity-features preference (needs to be set to 启用 ). To change preferences in Chrome, visit chrome://flags.
不支持 69 — 73 Alternate Name Disabled
Alternate Name Uses the non-standard name: policy
Disabled ). To change preferences in Chrome, visit
Edge 79
79
Edge Platform Status incorrectly describes this variable as document.policy . It was renamed in bug 917057 before being shipped in bug 703703 .
Firefox 69 Disabled
69 Disabled
Disabled From version 69: this feature is behind the dom.security.featurePolicy.webidl.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 65 — 69 Alternate Name Disabled
Alternate Name Uses the non-standard name: policy
Disabled ). To change preferences in Firefox, visit about:config.
IE No Opera 62
62
不支持 60 — 62 Disabled
Disabled From version 60 until version 62 (exclusive): this feature is behind the #enable-experimental-productivity-features preference (needs to be set to 启用 ).
不支持 56 — 60 Alternate Name Disabled
Alternate Name Uses the non-standard name: policy
Disabled From version 56 until version 60 (exclusive): this feature is behind the #enable-experimental-productivity-features preference (needs to be set to 启用 ).
Safari No WebView Android 74
74
Chrome Platform Status incorrectly describes this variable as document.policy . It was renamed in bug 917057 before being shipped in bug 703703 .
Chrome Android 74
74
Chrome Platform Status incorrectly describes this variable as document.policy . It was renamed in bug 917057 before being shipped in bug 703703 .
不支持 73 — 74 Disabled
Disabled From version 73 until version 74 (exclusive): this feature is behind the #enable-experimental-productivity-features preference (needs to be set to 启用 ). To change preferences in Chrome, visit chrome://flags.
不支持 69 — 73 Alternate Name Disabled
Alternate Name Uses the non-standard name: policy
Disabled ). To change preferences in Chrome, visit
Firefox Android 65 Alternate Name Disabled
65 Alternate Name Disabled
Alternate Name Uses the non-standard name: policy
Disabled ). To change preferences in Firefox, visit about:config.
Opera Android 48 Alternate Name Disabled
48 Alternate Name Disabled
Alternate Name Uses the non-standard name: policy
Disabled From version 48: this feature is behind the #enable-experimental-productivity-features preference (needs to be set to 启用 ).
Safari iOS No Samsung Internet Android 11.0

图例

完整支持

完整支持

不支持

不支持

实验。期望将来行为有所改变。

实验。期望将来行为有所改变。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

使用非标名称。

元数据

  • 最后修改:
  1. HTMLIFrameElement
  2. 特性
    1. allowPaymentRequest
    2. contentWindow
    3. csp
    4. featurePolicy
    5. referrerPolicy
  3. 方法
    1. setNfcFocus()
  4. 继承:
    1. HTMLElement
    2. 元素
    3. 节点
    4. EventTarget

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1