chromium/third_party/blink/renderer/core/html/fenced_frame/fence_event.idl

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

enum FenceReportingDestination {
  "buyer",
  "seller",
  "component-seller",
  "direct-seller",
  "shared-storage-select-url"
};

dictionary FenceEvent {
  // This dictionary has two mutually exclusive modes:

  // When reporting to a preregistered destination (specified by enum), the
  // following properties are used:
  DOMString eventType;
  DOMString eventData;
  sequence<FenceReportingDestination> destination;

  // Determines if this data can be sent in a reportEvent() beacon or automatic
  // beacon that originates from a document that is cross-origin to the mapped
  // URL of the fenced frame config that loaded this frame tree.
  // Note that automatic beacon data can only be set from documents that are
  // same-origin to the fenced frame config's mapped URL, so this effectively
  // opts in the data to being used in a cross-origin subframe.
  boolean crossOriginExposed = false;

  // When setting event data to be used later in an automatic beacon, the
  // following properties are used:
  // Determines if the beacon data will be used for only the next automatic
  // beacon event, or if it will be reused for all subsequent automatic beacons.
  boolean once = false;

  // When reporting to a custom destination URL (with substitution of macros
  // defined by the buyer), the following property is used:
  USVString destinationURL;
};