You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -275,7 +275,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
275
275
276
276
1. [=list/For each=] |she| of |navigationAPISHEs|:
277
277
278
-
1. If |navigation|'s [=Navigation/entry list=][=list/contains=]A{{NavigationHistoryEntry}} |existingAHE| whose [=NavigationHistoryEntry/session history entry=] is |she|, then:
278
+
1. If |navigation|'s [=Navigation/entry list=][=list/contains=]a{{NavigationHistoryEntry}} |existingAHE| whose [=NavigationHistoryEntry/session history entry=] is |she|, then:
279
279
280
280
1. [=list/Append=] |existingAHE| to |newEntryList|.
281
281
@@ -319,7 +319,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
319
319
320
320
1. Increment |index| by 1.
321
321
322
-
1. Assert: this step is never reached.
322
+
1. [=Assert=]: this step is never reached.
323
323
</div>
324
324
325
325
<h3 id="entries-api">Introspecting the navigation API history entry list</h3>
@@ -354,7 +354,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
354
354
355
355
1. If [=this=][=Navigation/has entries and events disabled=], then return false.
356
356
357
-
1. Assert: [=this=]'s [=Navigation/current entry index=] is not −1.
357
+
1. [=Assert=]: [=this=]'s [=Navigation/current entry index=] is not −1.
358
358
359
359
1. If [=this=]'s [=Navigation/current entry index=] is 0, then return false.
360
360
@@ -366,7 +366,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
366
366
367
367
1. If [=this=][=Navigation/has entries and events disabled=], then return false.
368
368
369
-
1. Assert: [=this=]'s [=Navigation/current entry index=] is not −1.
369
+
1. [=Assert=]: [=this=]'s [=Navigation/current entry index=] is not −1.
370
370
371
371
1. If [=this=]'s [=Navigation/current entry index=] is equal to [=this=]'s [=Navigation/entry list=]'s [=list/size=] − 1, then return false.
A {{Navigation}} has a <dfn for="Navigation">transition</dfn>, which is A{{NavigationTransition}} or null.
492
+
A {{Navigation}} has a <dfn for="Navigation">transition</dfn>, which is a{{NavigationTransition}} or null.
493
493
494
494
The <dfn attribute for="Navigation">transition</dfn> getter steps are to return [=this=]'s [=Navigation/transition=].
495
495
496
496
<hr>
497
497
498
-
A {{NavigationTransition}} has an associated <dfn for="NavigationTransition">navigation type</dfn>, which is A{{NavigationNavigationType}}.
498
+
A {{NavigationTransition}} has an associated <dfn for="NavigationTransition">navigation type</dfn>, which is a{{NavigationNavigationType}}.
499
499
500
-
A {{NavigationTransition}} has an associated <dfn for="NavigationTransition">from entry</dfn>, which is A{{NavigationHistoryEntry}}.
500
+
A {{NavigationTransition}} has an associated <dfn for="NavigationTransition">from entry</dfn>, which is a{{NavigationHistoryEntry}}.
501
501
502
502
A {{NavigationTransition}} has an associated <dfn for="NavigationTransition">finished promise</dfn>, which is an {{Promise}}.
503
503
@@ -598,7 +598,7 @@ We also need to ensure that, if we start a new navigation, navigations which hav
598
598
599
599
We end up accomplishing all this using the following setup:
600
600
601
-
Each {{Navigation}} object has an associated <dfn for="Navigation">ongoing navigate event</dfn>, A{{NavigateEvent}} or null, initially null.
601
+
Each {{Navigation}} object has an associated <dfn for="Navigation">ongoing navigate event</dfn>, a{{NavigateEvent}} or null, initially null.
602
602
603
603
Each {{Navigation}} object has an associated <dfn for="Navigation">ongoing navigation signal</dfn>, which is an {{AbortSignal}} or null, initially null.
604
604
@@ -614,7 +614,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
614
614
* A <dfn for="navigation API method navigation">key</dfn>, a string or null
615
615
* An <dfn for="navigation API method navigation">info</dfn>, a JavaScript value
616
616
* An <dfn for="navigation API method navigation">serialized state</dfn>, a [=serialized state=] or null
617
-
* A <dfn for="navigation API method navigation">committed-to entry</dfn>, A{{NavigationHistoryEntry}} or null
617
+
* A <dfn for="navigation API method navigation">committed-to entry</dfn>, a{{NavigationHistoryEntry}} or null
618
618
* A <dfn for="navigation API method navigation">committed promise</dfn>, a {{Promise}}
619
619
* A <dfn for="navigation API method navigation">finished promise</dfn>, a {{Promise}}
620
620
@@ -625,7 +625,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
625
625
626
626
1. Let |committedPromise| and |finishedPromise| be [=a new promise|new promises=] created in |navigation|'s [=relevant Realm=].
627
627
628
-
1. Mark as handled |finishedPromise|. <!-- TODO: link once https://github.com/whatwg/webidl/pull/1090 is merged -->
The web developer doesn't necessarily care about |finishedPromise| being rejected:
@@ -641,7 +641,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
641
641
642
642
1. Let |ongoingNavigation| be a [=navigation API method navigation=] whose [=navigation API method navigation/navigation object=] is |navigation|, [=navigation API method navigation/key=] is null, [=navigation API method navigation/info=] is |info|, [=navigation API method navigation/serialized state=] is |serializedState|, [=navigation API method navigation/committed-to entry=] is null, [=navigation API method navigation/committed promise=] is |committedPromise|, and [=navigation API method navigation/finished promise=] is |finishedPromise|.
643
643
644
-
1. Assert: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
644
+
1. [=Assert=]: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
645
645
646
646
1. Set |navigation|'s [=Navigation/upcoming non-traverse navigation=] to |ongoingNavigation|.
647
647
@@ -653,7 +653,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
653
653
654
654
1. Let |committedPromise| and |finishedPromise| be [=a new promise|new promises=] created in |navigation|'s [=relevant Realm=].
655
655
656
-
1. Mark as handled |finishedPromise|. <!-- TODO: link once https://github.com/whatwg/webidl/pull/1090 is merged -->
656
+
1. [=Mark as handled=] |finishedPromise|.
657
657
658
658
<p class="note">See <a href="#note-finished-promise-mark-as-handled">the previous discussion</a> as to why this is done.</p>
659
659
@@ -667,11 +667,11 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
667
667
<div algorithm>
668
668
To <dfn for="Navigation">promote the upcoming navigation to ongoing</dfn> given a {{Navigation}} |navigation| and a string-or-null |destinationKey|:
669
669
670
-
1. Assert: |navigation|'s [=Navigation/ongoing navigation=] is null.
670
+
1. [=Assert=]: |navigation|'s [=Navigation/ongoing navigation=] is null.
671
671
672
672
1. If |destinationKey| is not null, then:
673
673
674
-
1. Assert: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
674
+
1. [=Assert=]: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
675
675
676
676
1. If |navigation|'s [=Navigation/upcoming traverse navigations=][|destinationKey|][=map/exists=], then:
677
677
@@ -695,15 +695,15 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
695
695
696
696
1. Otherwise,
697
697
698
-
1. Assert: |navigation|'s [=navigation API method navigation/key=] is not null.
698
+
1. [=Assert=]: |navigation|'s [=navigation API method navigation/key=] is not null.
1. [=map/Remove=] |navigation|'s [=Navigation/upcoming traverse navigations=][|navigation|'s [=navigation API method navigation/key=]].
703
703
</div>
704
704
705
705
<div algorithm>
706
-
To <dfn for="navigation API method navigation">notify about the committed-to entry</dfn> given a [=navigation API method navigation=] |navigation| and A{{NavigationHistoryEntry}} |entry|:
706
+
To <dfn for="navigation API method navigation">notify about the committed-to entry</dfn> given a [=navigation API method navigation=] |navigation| and a{{NavigationHistoryEntry}} |entry|:
707
707
708
708
1. Set |navigation|'s [=navigation API method navigation/committed-to entry=] to |entry|.
709
709
@@ -825,7 +825,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
825
825
826
826
1. [=Assert=]: |browsingContext| is not null.
827
827
828
-
1. Assert: |historyHandling| is either "<a for="history handling behavior">`replace`</a>", "<a for="history handling behavior">`reload`</a>", or "<a for="history handling behavior">`default`</a>".
828
+
1. [=Assert=]: |historyHandling| is either "<a for="history handling behavior">`replace`</a>", "<a for="history handling behavior">`reload`</a>", or "<a for="history handling behavior">`default`</a>".
829
829
830
830
1. Let |ongoingNavigation| be the result of [=Navigation/setting the upcoming non-traverse navigation=] for |navigation| given |info| and |serializedState|.
831
831
@@ -924,7 +924,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
924
924
<div algorithm>
925
925
<p class="advisement">The following algorithm is specified in terms of the <a href="https://github.com/whatwg/html/pull/6315">session history rewrite pull request</a> against the HTML Standard, because the existing session history traversal infrastructure is broken enough that it's hard to build on. It is expected to track that work as it continues.</p>
926
926
927
-
To <dfn>perform a navigation API traversal</dfn> given a {{Navigation}} object |navigation|, a string |key|, and A{{NavigationOptions}} |options|:
927
+
To <dfn>perform a navigation API traversal</dfn> given a {{Navigation}} object |navigation|, a string |key|, and a{{NavigationOptions}} |options|:
928
928
929
929
1. If |navigation|'s [=relevant global object=]'s [=associated Document=] is not [=Document/fully active=], then return [=an early error result=] for an "{{InvalidStateError}}" {{DOMException}}.
930
930
@@ -1230,11 +1230,11 @@ The <dfn attribute for="NavigationDestination">sameDocument</dfn> getter steps a
1230
1230
1. Set |destination|'s [=NavigationDestination/state=] to null.
1231
1231
1. Set |destination|'s [=NavigationDestination/is same document=] to true if |destinationEntry|'s [=session history entry/document=] is equal to |navigation|'s [=relevant global object=]'s [=associated Document=]; otherwise false.
1232
1232
1. Let |result| be the result of performing the [=inner navigate event firing algorithm=] given |navigation|, "{{NavigationNavigationType/traverse}}", |event|, |destination|, |userInvolvement|, and null.
1233
-
1. Assert: |result| is true (traversals are never cancelable).
1233
+
1. [=Assert=]: |result| is true (traversals are never cancelable).
1234
1234
</div>
1235
1235
1236
1236
<div algorithm="fire a non-traversal navigate event">
1237
-
To <dfn>fire a non-traversal `navigate` event</dfn> at a {{Navigation}} |navigation| given A{{NavigationNavigationType}}<dfn for="fire a non-traversal navigate event">|navigationType|</dfn>, a [=URL=]<dfn for="fire a non-traversal navigate event">|destinationURL|</dfn>, a boolean <dfn for="fire a non-traversal navigate event">|isSameDocument|</dfn>, an optional [=user navigation involvement=]<dfn for="fire a non-traversal navigate event">|userInvolvement|</dfn> (default "<code>[=user navigation involvement/none=]</code>"), an optional [=serialized state=]-or-null <dfn for="fire a non-traversal navigate event">|state|</dfn> (default null), an optional [=entry list=] or null <dfn for="fire a non-traversal navigate event">|formDataEntryList|</dfn> (default null), and an optional [=serialized state=]-or-null <dfn for="fire a non-traversal navigate event">|classicHistoryAPISerializedData|</dfn> (default null):
1237
+
To <dfn>fire a non-traversal `navigate` event</dfn> at a {{Navigation}} |navigation| given a{{NavigationNavigationType}}<dfn for="fire a non-traversal navigate event">|navigationType|</dfn>, a [=URL=]<dfn for="fire a non-traversal navigate event">|destinationURL|</dfn>, a boolean <dfn for="fire a non-traversal navigate event">|isSameDocument|</dfn>, an optional [=user navigation involvement=]<dfn for="fire a non-traversal navigate event">|userInvolvement|</dfn> (default "<code>[=user navigation involvement/none=]</code>"), an optional [=serialized state=]-or-null <dfn for="fire a non-traversal navigate event">|state|</dfn> (default null), an optional [=entry list=] or null <dfn for="fire a non-traversal navigate event">|formDataEntryList|</dfn> (default null), and an optional [=serialized state=]-or-null <dfn for="fire a non-traversal navigate event">|classicHistoryAPISerializedData|</dfn> (default null):
1238
1238
1239
1239
1. Let |event| be the result of [=creating an event=] given {{NavigateEvent}}, in |navigation|'s [=relevant Realm=].
1240
1240
1. Set |event|'s [=NavigateEvent/classic history API serialized data=] to |classicHistoryAPISerializedData|.
@@ -1249,7 +1249,7 @@ The <dfn attribute for="NavigationDestination">sameDocument</dfn> getter steps a
1249
1249
</div>
1250
1250
1251
1251
<div algorithm>
1252
-
The <dfn>inner `navigate` event firing algorithm</dfn> is the following steps, given a {{Navigation}} |navigation|, A{{NavigationNavigationType}} |navigationType|, A{{NavigateEvent}} |event|, A{{NavigationDestination}} |destination|, a [=user navigation involvement=] |userInvolvement|, and an [=entry list=] or null |formDataEntryList|:
1252
+
The <dfn>inner `navigate` event firing algorithm</dfn> is the following steps, given a {{Navigation}} |navigation|, a{{NavigationNavigationType}} |navigationType|, a{{NavigateEvent}} |event|, a{{NavigationDestination}} |destination|, a [=user navigation involvement=] |userInvolvement|, and an [=entry list=] or null |formDataEntryList|:
1253
1253
1254
1254
1. [=Navigation/Promote the upcoming navigation to ongoing=] given |navigation| and |destination|'s [=NavigationDestination/key=].
1255
1255
1. Let |ongoingNavigation| be |navigation|'s [=Navigation/ongoing navigation=].
@@ -1292,9 +1292,9 @@ The <dfn attribute for="NavigationDestination">sameDocument</dfn> getter steps a
1292
1292
1. Let |endResultIsSameDocument| be true if |hadTransitionWhile| is true or |destination|'s [=NavigationDestination/is same document=] is true.
1293
1293
1. If |hadTransitionWhile| is true:
1294
1294
1. Let |fromEntry| be the [=Navigation/current entry=] for |navigation|.
1295
-
1. Assert: |fromEntry| is not null.
1295
+
1. [=Assert=]: |fromEntry| is not null.
1296
1296
1. Set |navigation|'s [=Navigation/transition=] to a [=new=] {{NavigationTransition}} created in |navigation|'s [=relevant Realm=], whose [=NavigationTransition/navigation type=] is |navigationType|, [=NavigationTransition/from entry=] is |fromEntry|, and whose [=NavigationTransition/finished promise=] is [=a new promise=] created in |navigation|'s [=relevant Realm=].
1297
-
1. Mark as handled |navigation|'s [=Navigation/transition=]'s [=NavigationTransition/finished promise=]. <!-- TODO: link once https://github.com/whatwg/webidl/pull/1090 is merged -->
1297
+
1. [=Mark as handled=] |navigation|'s [=Navigation/transition=]'s [=NavigationTransition/finished promise=].
1298
1298
<p class="note">See <a href="#note-finished-promise-mark-as-handled">the discussion about other finished promises</a> as to why this is done.</p>
1299
1299
1. If |endResultIsSameDocument| is true:
1300
1300
1. Let |tweakedPromisesList| be |event|'s [=NavigateEvent/navigation action promises list=].
0 commit comments