diff --git a/index.bs b/index.bs index c6f0ae8fa..7690e56a0 100644 --- a/index.bs +++ b/index.bs @@ -40,8 +40,8 @@ spec: idl; type: dfn; urlPrefix: https://webidl.spec.whatwg.org/ text: throw; url: #dfn-throw spec: uuid; type: dfn; urlPrefix: https://wicg.github.io/uuid/ text: generate a random UUID; url: #dfn-generate-a-random-uuid -spec: fenced-frame; type: dfn; urlPrefix: https://wicg.github.io/fenced-frame/ - text: send a beacon; url:#send-a-beacon +urlPrefix: https://wicg.github.io/fenced-frame/; type: interface + text: Fence
 {
@@ -503,7 +503,115 @@ Add the step:
 
 # Fenced Frame monkeypatches # {#fenced-frame-monkeypatches}
 
-Issue: Modify [=send a beacon=] when the [=fetch=] integration is specified.
+Add the following items to [=fencedframetype/pending event=]:
+
+
+: attributionReportingEnabled +:: A [=boolean=] +: contextOrigin +:: An [=origin=] + +
+ +Modify {{Fence/reportEvent()}} as follows: + +
+ +Replace the step + +> Run report an event using |instance|'s +> [=fenced frame config instance/fenced frame reporter=] with |destination|, +> |event|'s {{FenceEvent/eventType}}, and |event|'s {{FenceEvent/eventData}}. + +with + +Run report an event using |instance|'s +[=fenced frame config instance/fenced frame reporter=] with |destination|, +|event|'s {{FenceEvent/eventType}}, |event|'s {{FenceEvent/eventData}}, +and [=this=]'s [=relevant global object=]'s [=associated Document=]. + +
+ +Modify report an event as follows: + +
+ +Add a [=Document=] parameter called |document|. + +After the step + +> If |reporting map|[|destination|] does not [=map/exist=], return. + +add the steps + +1. Let |attributionReportingEnabled| be the result of determining whether |document| is + [=allowed to use=] the "[=attribution-reporting=]" feature. +1. Let |contextOrigin| be |document|'s [=node/context origin=]. + +In the step + +> Let newEvent be a new [=fencedframetype/pending event=] with the following... + +add the properties + +: [=pending event/attributionReportingEnabled=] +:: |attributionReportingEnabled| +: [=pending event/contextOrigin=] +:: |contextOrigin| + +Replace the step + +> Send a beacon with |reporting map|[|destination|], +> |eventType|, and |eventData|. + +with + +Send a beacon with |reporting map|[|destination|], +|eventType|, |eventData|, |attributionReportingEnabled|, and |contextOrigin|. + +
+ +Modify [=finalize a reporting destination=] as follows: + +
+ +Replace the step + +> Send a beacon with |destination map|, |pending event|'s [=pending event/eventType=], +> and |pending event|'s [=pending event/eventData=]. + +with + +Send a beacon with |destination map|, |pending event|'s [=pending event/eventType=], +|pending event|'s [=pending event/eventData=], |pending event|'s [=pending event/attributionReportingEnabled=], +and |pending event|'s [=pending event/contextOrigin=]. + +
+ +Modify send a beacon as follows: + +
Let destination url be destination map[eventType]. + +add the steps + +1. Let |attributionReportingEligibility| be "[=eligibility/unset=]". +1. If |attributionReportingEnabled| is true and the result of [=getting supported registrars=] + is not [=list/is empty|empty=] and |contextOrigin| [=check if an origin is suitable|is suitable=]: + 1. Set |attributionReportingEligibility| to "[=eligibility/event-source=]". + + Issue: Allow "[=eligibility/navigation-source=]" when automatic beacon is specified. + +Issue: Set [=request=]'s [=request/Attribution Reporting eligibility=] to |attributionReportingEligibility| +when the fetch integration is specified. + +
# Permissions Policy integration # {#permission-policy-integration} @@ -1249,6 +1357,11 @@ is true and whose same-site-flag is "`None`"; there is no way to prevent the last-access-time from being modified; and the return value is a string that would have to be further processed to check for the "`ar_debug`" cookie. +

Obtaining context origin

+ +To obtain the context origin of a [=node=] |node|, return |node|'s [=node navigable=]'s +unfenced container document's [=origin=]. +

Obtaining a randomized response

To obtain a randomized response given |trueValue|, a [=set=] |possibleValues|, and a @@ -1333,18 +1446,17 @@ To validate a background attributionsrc eligibility given an "[=eligibility/navigation-source=]" or "[=eligibility/event-source-or-trigger=]". -To make a background attributionsrc request given a [=URL=] |url|, a -[=suitable origin=] |contextOrigin|, an [=eligibility=] |eligibility|, and a +To make a background attributionsrc request given a [=URL=] |url|, an +[=origin=] |contextOrigin|, an [=eligibility=] |eligibility|, and a {{Document}} |document|: 1. [=Validate a background attributionsrc eligibility|Validate=] |eligibility|. 1. If |url|'s [=url/scheme=] is not [=check if a scheme is suitable|suitable=], return. +1. If |contextOrigin| is not [=check if an origin is suitable|suitable=], return. 1. Let |context| be |document|'s [=relevant settings object=]. 1. If |context| is not a [=secure context=], return. -1. If the "[=attribution-reporting=]" feature - is not enabled - in |document| with |document|'s [=url/origin=], return. +1. If |document| is not [=allowed to use=] the "[=attribution-reporting=]" feature, return. 1. Let |supportedRegistrars| be the result of [=getting supported registrars=]. 1. If |supportedRegistrars| [=list/is empty=], return. 1. Let |request| be a new [=request=] with the following properties: @@ -1365,7 +1477,7 @@ Issue: Audit other properties on |request| and set them properly. Issue(839): Support header-processing on redirects. Due to atomic HTTP redirect handling, we cannot process registrations through integration with [=fetch=]. -Issue: Support header-processing on [=send a beacon|fenced frame reporting beacons=]. +Issue: Support header-processing on fenced frame reporting beacons. Issue: Check for transient activation with "[=eligibility/navigation-source=]". @@ -1384,9 +1496,7 @@ To make background attributionsrc requests given an [=iteration/continue=]. Otherwise, let |url| be the resulting [=URL record=]. 1. Run [=make a background attributionsrc request=] with |url|, - |contextOrigin|, |eligibility|, and |element|'s [=Node/node document=]. - -Issue: Set |contextOrigin| properly. + |element|'s [=node/context origin=], |eligibility|, and |element|'s [=Node/node document=]. Issue: Consider allowing the user agent to limit the size of |tokens|.