fenced-frame.idl (3037B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Fenced Frame (https://wicg.github.io/fenced-frame/) 5 6 [Exposed=Window] 7 interface HTMLFencedFrameElement : HTMLElement { 8 [HTMLConstructor] constructor(); 9 10 [CEReactions] attribute FencedFrameConfig? config; 11 [CEReactions] attribute DOMString width; 12 [CEReactions] attribute DOMString height; 13 [SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox; 14 [CEReactions] attribute DOMString allow; 15 }; 16 17 enum OpaqueProperty {"opaque"}; 18 19 [Exposed=Window, Serializable] 20 interface FencedFrameConfig { 21 constructor(USVString url); 22 undefined setSharedStorageContext(DOMString contextString); 23 }; 24 25 typedef (USVString or FencedFrameConfig) UrnOrConfig; 26 27 partial interface Navigator { 28 Promise<undefined> deprecatedReplaceInURN( 29 UrnOrConfig urnOrConfig, record<USVString, USVString> replacements); 30 Promise<USVString> deprecatedURNtoURL( 31 UrnOrConfig urnOrConfig, optional boolean send_reports = false); 32 sequence<USVString> adAuctionComponents(unsigned short numAdComponents); 33 }; 34 35 enum FenceReportingDestination { 36 "buyer", 37 "seller", 38 "component-seller", 39 "direct-seller", 40 "shared-storage-select-url", 41 }; 42 43 dictionary FenceEvent { 44 // This dictionary has two mutually exclusive modes that aren’t represented as 45 // distinct IDL types due to distinguishability issues: 46 // 47 // When reporting to a preregistered destination (specified by enum), the following 48 // properties are used: 49 DOMString eventType; 50 DOMString eventData; 51 sequence<FenceReportingDestination> destination; 52 53 // Determines if this data can be sent in a reportEvent() beacon or automatic 54 // beacon that originates from a document that is cross-origin to the mapped 55 // URL of the fenced frame config that loaded this frame tree. 56 // Note that automatic beacon data can only be set from documents that are 57 // same-origin to the fenced frame config’s mapped URL, so this effectively 58 // opts in the data to being used in a cross-origin subframe. 59 boolean crossOriginExposed = false; 60 61 // When setting event data to be used later in an automatic beacon, the 62 // following properties are used: 63 boolean once = false; 64 65 // When reporting to a custom destination URL (with substitution of macros defined by 66 // the Protected Audience buyer), the following property is used: 67 USVString destinationURL; 68 }; 69 70 typedef (FenceEvent or DOMString) ReportEventType; 71 72 [Exposed=Window] 73 interface Fence { 74 undefined reportEvent(optional ReportEventType event = {}); 75 undefined setReportEventDataForAutomaticBeacons(optional FenceEvent event = {}); 76 sequence<FencedFrameConfig> getNestedConfigs(); 77 Promise<undefined> disableUntrustedNetwork(); 78 undefined notifyEvent(Event event); 79 }; 80 81 partial interface Window { 82 // Collection of fenced frame APIs 83 readonly attribute Fence? fence; 84 }; 85 86 partial interface mixin GlobalEventHandlers { 87 attribute EventHandler onfencedtreeclick; 88 };