HTMLFencedFrameElement: allow 屬性
allow 屬性是 HTMLFencedFrameElement 的一個屬性,用於獲取和設定相應的 <fencedframe> allow 屬性的值。該屬性表示在內容首次嵌入時應用於該內容的 許可權策略。
並非所有許可權策略都允許在 fenced frames 中使用。允許的許可權列於 fenced frames 可用的許可權策略 — 這些是來自指定 API 的 fenced frame 內容載入所必需的。如果您不設定 allow 屬性,這些許可權將預設允許。如果您想縮小許可權範圍,則需要確保您正在使用的 API 的所有必需許可權都在 allow 屬性中設定。
值
表示 許可權策略 的字串。
示例
js
const frame = document.createElement("fencedframe");
console.log(frame.allow);
規範
| 規範 |
|---|
| 圍欄框架 # dom-htmlfencedframeelement-allow |
瀏覽器相容性
載入中…
另見
- privacysandbox.google.com 上的Fenced frames
- 隱私沙盒(位於 privacysandbox.google.com)