Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec reserved.top_navigation_start and reserved.top_navigation_commit #130

Merged
merged 13 commits into from
Nov 7, 2023
Prev Previous commit
Next Next commit
address comments and re-add top_navigation
  • Loading branch information
blu25 committed Nov 1, 2023
commit 90058606bad2845eff950a94a712d6683ccee085
36 changes: 25 additions & 11 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,14 @@ following [=struct/items=]:
</dl>

An <dfn for=fencedframetype>automatic beacon event type</dfn> is either "<dfn
for="automatic beacon event type">`reserved.top_navigation_start`</dfn>" or "<dfn
for="automatic beacon event type">`reserved.top_navigation_commit`</dfn>".
for="automatic beacon event type">`reserved.top_navigation_start`</dfn>", "<dfn
for="automatic beacon event type">`reserved.top_navigation_commit`</dfn>", or "<dfn
for="automatic beacon event type">`reserved.top_navigation`</dfn>".

Advisement: <code>[=automatic beacon event type/reserved.top_navigation=]</code> is an earlier
naming of <code>[=automatic beacon event type/reserved.top_navigation_commit=]</code>. While they
both do the same thing, <code>[=automatic beacon event type/reserved.top_navigation=]</code> will be
depreacted in the future and should not be used for new code.
blu25 marked this conversation as resolved.
Show resolved Hide resolved

An <dfn for=fencedframetype>automatic beacon data</dfn> is a [=struct=] with the following
[=struct/items=]:
Expand Down Expand Up @@ -1690,10 +1696,11 @@ A side effect of the fenced boundary model is that ads will lose the ability to
resulted in a successful navigation. This is because the page loaded from a top-level [=navigate|
navigation=] originating from a fenced frame will not be allowed to report to the fenced frame that
it loaded (through something like <code>window.[=Window/opener=]</code>). Instead, we introduce
special event-level [=destination enum event/type|reporting type=]s, `reserved.top_navigation_start`
and `resrved.top_navigation_commit`, which automatically sends an [=report an event|event-level
beacon=] when a fenced frame initiates a successful [=navigate|navigation=] to a [=top-level
traversable=].
special event-level [=automatic beacon event/type|reporting type=]s, <code>[=automatic beacon event
type/reserved.top_navigation_start=]</code> and <code>[=automatic beacon event
type/reserved.top_navigation_commit=]</code>, which automatically sends an [=report an
event|event-level beacon=] when a fenced frame initiates a successful [=navigate|navigation=] to a
[=top-level traversable=].

<div algorithm>
To <dfn>attempt to send an automatic beacon</dfn> given a [=source snapshot params=]
Expand Down Expand Up @@ -1763,17 +1770,24 @@ traversable=].

5. [=Attempt to send an automatic beacon=] given <var ignore>sourceSnapshotParams</var>, <var
ignore>initiatorOriginSnapshot</var>, <var ignore>navigable</var>’s associated {{Document}},
and "[=automatic beacon event type/reserved.top_navigation_start=]".
and <code>[=automatic beacon event type/reserved.top_navigation_start=]</code>.
</div>

<div algorithm="top_navigation_commit beacon patch">
Modify [[HTML]]'s [=attempt to populate the history entry's document=] algorithm. In step 6,
substep 11, add a new step after step 5 that reads:

6. If <var ignore>failure</var> is false, then [=attempt to send an automatic beacon=] given <var
ignore>sourceSnapshotParams</var>, <var ignore>entry</var>'s [=document state=]'s [=document
state/initiator origin=], <var ignore>document</var>, and "[=automatic beacon event
type/reserved.top_navigation_commit=]".
6. If <var ignore>failure</var> is false, then:

1. [=Attempt to send an automatic beacon=] given <var
ignore>sourceSnapshotParams</var>, <var ignore>entry</var>'s [=document state=]'s [=document
state/initiator origin=], <var ignore>document</var>, and <code>[=automatic beacon event
type/reserved.top_navigation_commit=]</code>.

1. [=Attempt to send an automatic beacon=] given <var
ignore>sourceSnapshotParams</var>, <var ignore>entry</var>'s [=document state=]'s [=document
state/initiator origin=], <var ignore>document</var>, and <code>[=automatic beacon event
type/reserved.top_navigation=]</code>.
</div>

<h2 id=html-integration>HTML Integration</h2>
Expand Down