Skip to content

Commit

Permalink
Reorder promise resolutions for navigation API
Browse files Browse the repository at this point in the history
The API method tracker finished promise vs. the navigation transition finished promise ordering did not match the tests and Chromium implementation. There's no real argument for one order vs. the other, so update the spec to match.

Closes #10646.
  • Loading branch information
domenic committed Sep 30, 2024
1 parent b8ea975 commit 09db56b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -95198,6 +95198,9 @@ interface <dfn interface>NavigationDestination</dfn> {
<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>

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

<li><p>If <var>navigation</var>'s <span
data-x="concept-Navigation-transition">transition</span> is not null, then resolve
<var>navigation</var>'s <span data-x="concept-Navigation-transition">transition</span>'s
Expand All @@ -95206,9 +95209,6 @@ interface <dfn interface>NavigationDestination</dfn> {

<li><p>Set <var>navigation</var>'s <span
data-x="concept-Navigation-transition">transition</span> to null.</p></li>

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

<p>and the following failure steps given reason <var>rejectionReason</var>:</p>
Expand Down Expand Up @@ -95238,6 +95238,9 @@ interface <dfn interface>NavigationDestination</dfn> {
<code>ErrorEvent</code>, with additional attributes initialized according to
<var>errorInfo</var>.</p></li>

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

<li><p>If <var>navigation</var>'s <span
data-x="concept-Navigation-transition">transition</span> is not null, then reject
<var>navigation</var>'s <span data-x="concept-Navigation-transition">transition</span>'s
Expand All @@ -95246,9 +95249,6 @@ interface <dfn interface>NavigationDestination</dfn> {

<li><p>Set <var>navigation</var>'s <span
data-x="concept-Navigation-transition">transition</span> to null.</p></li>

<li><p>If <var>apiMethodTracker</var> is non-null, then <span>reject the finished
promise</span> for <var>apiMethodTracker</var> with <var>rejectionReason</var>.</p></li>
</ol>
</li>
</ol>
Expand Down

0 comments on commit 09db56b

Please sign in to comment.