Class Fence
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalFence interface of the {{domxref("Fenced Frame API", "Fenced Frame API", "", "nocode")}} contains several functions relevant to fencedframe functionality.
[Value("Fence")]
public class Fence
- Inheritance
-
Fence
- Inherited Members
Remarks
Fence objects are accessed through the Fence property, but they are only available to documents embedded inside {{htmlelement("fencedframe")}}s (loaded via FencedFrameConfigs) or {{htmlelement("iframe")}}s (loaded via opaque URNs).
NOTE
See How do
<fencedframe>s work? for some description aroundFencedFrameConfigs and opaque URNs.
-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com
Constructors
Fence()
public Fence()
Methods
DisableUntrustedNetwork()
[Value("disableUntrustedNetwork")]
public Task<GlobalObject.Undefined> DisableUntrustedNetwork()
Returns
GetNestedConfigs()
NOTE
ExperimentalgetNestedConfigs() method of theFence interface returns the FencedFrameConfigs loaded into
<fencedframe>s embedded inside the current <fencedframe>.
[Value("getNestedConfigs")]
public List<FencedFrameConfig> GetNestedConfigs()
Returns
- List<FencedFrameConfig>
getNestedConfigs()has two possible return values:
Remarks
-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com
NotifyEvent(Event)
[Value("notifyEvent")]
public GlobalObject.Undefined NotifyEvent(Event event_)
Parameters
event_Event
Returns
ReportEvent(Union38)
NOTE
ExperimentalreportEvent() method of theFence interface triggers the submission of report data via a beacon to one or more specific URLs registered via the RegisterAdBeacon(Dictionary<string, string>) method of the Protected Audience API, for the purpose of collecting ad auction results.
[Value("reportEvent")]
public GlobalObject.Undefined ReportEvent(Union38 event_ = default)
Parameters
event_Union38
Returns
- GlobalObject.Undefined
None (
Undefined).
Remarks
NOTE
SetReportEventDataForAutomaticBeacons(FenceEvent) provides similar report data submission, except in that case the submission is triggered via a navigation rather than by an explicit method call.
-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com
SetReportEventDataForAutomaticBeacons(FenceEvent)
NOTE
ExperimentalsetReportEventDataForAutomaticBeacons() method of theFence interface specifies event data that will be sent when a navigation occurs inside a {{htmlelement("fencedframe")}}. This data will be sent via an automatic beacon to one or more specific URLs registered via the RegisterAdBeacon(Dictionary<string, string>) method of the Protected Audience API, for the purpose of collecting reporting data for ad auction results.
[Value("setReportEventDataForAutomaticBeacons")]
public GlobalObject.Undefined SetReportEventDataForAutomaticBeacons(FenceEvent event_ = null)
Parameters
event_FenceEvent
Returns
- GlobalObject.Undefined
None (
Undefined).
Remarks
NOTE
ReportEvent(Union38) provides similar report data submission, except in that case the submission is triggered via an explicit method call rather than a navigation.
-Fenced frames on privacysandbox.google.com
-The Privacy Sandbox on privacysandbox.google.com