Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 23 additions & 30 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -101503,17 +101503,25 @@ interface <dfn interface>NavigationDestination</dfn> {
</li>

<li>
<p>If <var>apiMethodTracker</var> is not null:</p>
<p>If <var>apiMethodTracker</var> is null:</p>

<ol>
<li><p>Set <var>navigation</var>'s <span>ongoing API method tracker</span> to
<var>apiMethodTracker</var>.</p></li>
<li><p>Let <var>info</var> be undefined.</p></li>

<li><p>Set <var>apiMethodTracker</var>'s <span
data-x="navigation-api-method-tracker-pending">pending</span> to false.</p></li>
<li><p>Let <var>serializedState</var> be null.</p></li>

<li><p>Set <var>apiMethodTracker</var> to the result of <span data-x="set up a navigate/reload
API method tracker">setting up a navigate/reload API method tracker</span> for
<span>this</span> given <var>info</var> and <var>serializedState</var>.</p></li>
</ol>
</li>

<li><p>Set <var>navigation</var>'s <span>ongoing API method tracker</span> to
<var>apiMethodTracker</var>.</p></li>

<li><p>Set <var>apiMethodTracker</var>'s <span
data-x="navigation-api-method-tracker-pending">pending</span> to false.</p></li>

<li><p>Let <var>navigable</var> be <var>navigation</var>'s <span>relevant global object</span>'s
<span data-x="window navigable">navigable</span>.</p></li>

Expand Down Expand Up @@ -101574,10 +101582,8 @@ interface <dfn interface>NavigationDestination</dfn> {
<var>downloadRequestFilename</var>.</p></li>

<li>
<p>If <var>apiMethodTracker</var> is not null, then initialize <var>event</var>'s <code
data-x="dom-NavigateEvent-info">info</code> to <var>apiMethodTracker</var>'s <span
data-x="navigation-api-method-tracker-info">info</span>. Otherwise, initialize it to
undefined.</p>
<p>Initialize <var>event</var>'s <code data-x="dom-NavigateEvent-info">info</code> to
<var>apiMethodTracker</var>'s <span data-x="navigation-api-method-tracker-info">info</span>.</p>

<p class="note">At this point <var>apiMethodTracker</var>'s <span
data-x="navigation-api-method-tracker-info">info</span> is no longer needed and can be nulled
Expand Down Expand Up @@ -101772,6 +101778,8 @@ interface <dfn interface>NavigationDestination</dfn> {
<var>apiMethodTracker</var>:</p>

<ol>
<li><p><span>Assert</span>: <var>apiMethodTracker</var> is not null.</p></li>

<li><p>Let <var>navigation</var> be <var>event</var>'s <span
data-x="concept-event-target">target</span>.</p></li>

Expand Down Expand Up @@ -101911,6 +101919,10 @@ interface <dfn interface>NavigationDestination</dfn> {
<ol>
<li><p>Let <var>promisesList</var> be an empty <span>list</span>.</p></li>

<li><p><span data-x="list append">Append</span> <var>apiMethodTracker</var>'s <span
data-x="navigation-api-method-tracker-committed">committed promise</span> to
<var>promisesList</var>.</p></li>

<li>
<p><span data-x="list iterate">For each</span> <var>handler</var> of <var>event</var>'s <span
data-x="concept-NavigateEvent-navigation-handler-list">navigation handler list</span>:</p>
Expand All @@ -101922,23 +101934,6 @@ interface <dfn interface>NavigationDestination</dfn> {
</ol>
</li>

<li>
<p>If <var>promisesList</var>'s <span data-x="list size">size</span> is 0, then set
<var>promisesList</var> to « <span>a promise resolved with</span> undefined ».</p>

<p class="note">There is a subtle timing difference between how <span data-x="wait for
all">waiting for all</span> schedules its success and failure steps when given zero promises
versus ≥1 promises. For most uses of <span data-x="wait for all">waiting for all</span>, this
does not matter. However, with this API, there are so many events and promise handlers which
could fire around the same time that the difference is pretty easily observable: it can cause
the event/promise handler sequence to vary. (Some of the events and promises involved include:
<code data-x="event-navigatesuccess">navigatesuccess</code> / <code
data-x="event-navigateerror">navigateerror</code>, <code
data-x="event-currententrychange">currententrychange</code>, <code
data-x="event-dispose">dispose</code>, <var>apiMethodTracker</var>'s promises, and the <code
data-x="dom-NavigationTransition-finished">navigation.transition.finished</code> promise.)
</li>

<li>
<p><span>Wait for all</span> of <var>promisesList</var>, with the following success steps:</p>

Expand All @@ -101959,8 +101954,7 @@ interface <dfn interface>NavigationDestination</dfn> {
<li><p><span data-x="NavigateEvent-finish">Finish</span> <var>event</var> given
true.</p></li>

<li><p>If <var>apiMethodTracker</var> is non-null, then <span>resolve the finished
promise</span> for <var>apiMethodTracker</var>.</p></li>
<li><p><span>Resolve the finished promise</span> for <var>apiMethodTracker</var>.</p></li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-navigatesuccess">navigatesuccess</code> at <var>navigation</var>.</p></li>
Expand All @@ -101981,8 +101975,7 @@ interface <dfn interface>NavigationDestination</dfn> {
</ol>
</li>

<li><p>Otherwise, if <var>apiMethodTracker</var> is non-null, then <span
data-x="navigation-api-method-tracker-clean-up">clean up</span>
<li><p><span data-x="navigation-api-method-tracker-clean-up">Clean up</span>
<var>apiMethodTracker</var>.</p></li>

<li>
Expand Down