Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Fence

Fence

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

TheFence interface of theFenced Frame API contains several functions relevant to<fencedframe> functionality.

Fence objects are accessed through theWindow.fence property, but they are only available to documents embedded inside<fencedframe>s (loaded viaFencedFrameConfigs) or<iframe>s (loaded via opaque URNs).

Note:SeeHow do<fencedframe>s work? for some description aroundFencedFrameConfigs and opaque URNs.

Instance methods

getNestedConfigs()Experimental

Returns theFencedFrameConfigs loaded into<fencedframe>s embedded inside the current<fencedframe>.

reportEvent()Experimental

Triggers the submission of report data via abeacon to one ore more specific URLs registered via theregisterAdBeacon() method of theProtected Audience API, for the purpose of collecting ad auction results.

setReportEventDataForAutomaticBeacons()Experimental

Specifies event data that will be sent when a navigation occurs inside a<fencedframe>. This data will be sent via an automatic beacon to one or more specific URLs registered via theregisterAdBeacon() method of theProtected Audience API, for the purpose of collecting reporting data for ad auction results.

Examples

js
window.fence.reportEvent({  eventType: "click",  eventData: JSON.stringify({ clickX: "123", clickY: "456" }),  destination: ["buyer", "seller"],});

Specifications

Specification
Fenced Frame
# fence-interface

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp