Window: fence プロパティ
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
fence
は、Window
インターフェイスの読み取り専用のプロパティであり、現在の文書コンテキストに対応する Fence
オブジェクトインスタンスを返します。
Fence
オブジェクトは、<fencedframe>
(FencedFrameConfig
経由で読み込まれたもの)または<iframe>
(不透明な URN 経由で読み込まれたもの)内に埋め込まれた文書でのみ利用できます。
メモ:
FencedFrameConfig
と不透明な URN に関する説明については、 <fencedframe>
の仕組みを参照してください。
値
Fence
オブジェクトのインスタンス、またはこの文書コンテキストが Fence
オブジェクトにアクセスできない場合は null
です。
例
js
window.fence.reportEvent({
eventType: "click",
eventData: JSON.stringify({ clickX: "123", clickY: "456" }),
destination: ["buyer", "seller"],
});
仕様書
Specification |
---|
Fenced Frame> # dom-window-fence> |
ブラウザーの互換性
Loading…
関連情報
- Fenced frames on privacysandbox.google.com
- The Privacy Sandbox on privacysandbox.google.com