Window: fence プロパティ
非推奨
削除予定
この機能は、ブラウザーから除去される予定です。現時点でこの機能を使用すると、今後の更新で正常に動作しなくなる可能性があります。
Following the announcement that Chrome will maintain its current approach to third-party cookies, Chrome decided to withdraw certain Privacy Sandbox features including the <fencedframe> element and related APIs.
>
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"],
});
仕様書
| 仕様書 |
|---|
| Fenced Frame> # dom-window-fence> |
ブラウザーの互換性
関連情報
- Fenced frames on privacysandbox.google.com
- The Privacy Sandbox on privacysandbox.google.com