Firefox Tomorrow

web api interface

Fence

View on MDN ↗

Limited availability

The Fence interface of the Fenced Frame API contains several functions relevant to <fencedframe> functionality.

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

[!NOTE] See How do <fencedframe>s work? for some description around FencedFrameConfigs and opaque URNs.

Instance methods

Examples

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

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also