Skip to content

Commit

Permalink
Update automatic beacon algorithm to send to all registered URLs (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
blu25 committed Sep 28, 2023
1 parent 2ecd14a commit ed8c323
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1636,16 +1636,22 @@ successful [=navigate|navigation=] to a [=top-level traversable=].
1. Let |beacon data| be |config|'s [=fenced frame config instance/fenced frame reporter=]'s
[=fenced frame reporter/automatic beacon data=].

1. If |beacon data| is null, abort these steps.
1. Let |event data| be |beacon data|'s [=automatic beacon data/eventData=] if |beacon data| is not
null, the empty string otherwise.

1. If |sourceOrigin| is not [=same origin=] with |config|'s [=fenced frame config instance/mapped
url=]'s [=url/origin=], abort these steps.

1. [=list/For each=] |destination| of |beacon data|'s [=automatic beacon data/destination=]:
1. [=list/For each=] |destination| of |config|'s [=fenced frame config instance/fenced frame
reporter=]'s [=fenced frame reporter/fenced frame reporting metadata reference=]'s
[=fencedframetype/fenced frame reporting map=]'s [=map/keys=]:

1. Run [=report an event=] using |config|'s [=fenced frame config instance/fenced frame
reporter=] with |destination|, |eventType|, and |beacon data|'s [=automatic beacon data/
eventData=].
1. If |beacon data|'s [=automatic beacon data/destinations=] [=list/contains=] |destination|,
run [=report an event=] using |config|'s [=fenced frame config instance/fenced frame
reporter=] with |destination|, |eventType|, and |event data|.

Otherwise, run [=report an event=] using |config|'s [=fenced frame config instance/fenced
frame reporter=] with |destination|, |eventType|, and the empty string.

1. If |beacon data|'s [=automatic beacon data/once=] is true, set |config|'s [=fenced frame
config instance/fenced frame reporter=]'s [=fenced frame reporter/automatic beacon data=] to
Expand All @@ -1656,6 +1662,7 @@ successful [=navigate|navigation=] to a [=top-level traversable=].
/fenced-frame/automatic-beacon-two-events-clear.https.html
/fenced-frame/automatic-beacon-two-events-persist.https.html
/fenced-frame/automatic-beacon-unfenced-top.https.html
/fenced-frame/automatic-beacon-no-destination.https.html
</wpt>
</div>

Expand Down

0 comments on commit ed8c323

Please sign in to comment.