Skip to content

Commit 8365d94

Browse files
authored
Minor spec fixes
Closes #208. Closes #209. Closes #211.
1 parent cf4c60b commit 8365d94

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

spec.bs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
217217

218218
1. If |navigation| [=Navigation/has entries and events disabled=], then:
219219

220-
1. Assert: |navigation|'s [=Navigation/entry list=] [=list/is empty=].
220+
1. [=Assert=]: |navigation|'s [=Navigation/entry list=] [=list/is empty=].
221221

222222
1. Return.
223223

@@ -275,7 +275,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
275275

276276
1. [=list/For each=] |she| of |navigationAPISHEs|:
277277

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:
279279

280280
1. [=list/Append=] |existingAHE| to |newEntryList|.
281281

@@ -319,7 +319,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
319319

320320
1. Increment |index| by 1.
321321

322-
1. Assert: this step is never reached.
322+
1. [=Assert=]: this step is never reached.
323323
</div>
324324

325325
<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
354354

355355
1. If [=this=] [=Navigation/has entries and events disabled=], then return false.
356356

357-
1. Assert: [=this=]'s [=Navigation/current entry index=] is not &minus;1.
357+
1. [=Assert=]: [=this=]'s [=Navigation/current entry index=] is not &minus;1.
358358

359359
1. If [=this=]'s [=Navigation/current entry index=] is 0, then return false.
360360

@@ -366,7 +366,7 @@ Each {{Navigation}} object has an associated <dfn for="Navigation">current entry
366366

367367
1. If [=this=] [=Navigation/has entries and events disabled=], then return false.
368368

369-
1. Assert: [=this=]'s [=Navigation/current entry index=] is not &minus;1.
369+
1. [=Assert=]: [=this=]'s [=Navigation/current entry index=] is not &minus;1.
370370

371371
1. If [=this=]'s [=Navigation/current entry index=] is equal to [=this=]'s [=Navigation/entry list=]'s [=list/size=] &minus; 1, then return false.
372372

@@ -407,15 +407,15 @@ dictionary NavigationCurrentEntryChangeEventInit : EventInit {
407407
<div algorithm>
408408
The <dfn for="Navigation">current entry</dfn> for a {{Navigation}} |navigation| is the result running of the following algorithm:
409409

410-
1. If [=this=] [=Navigation/has entries and events disabled=], then return null.
410+
1. If |navigation| [=Navigation/has entries and events disabled=], then return null.
411411

412-
1. Assert: [=this=]'s [=Navigation/current entry index=] is not &minus;1.
412+
1. [=Assert=]: |navigation|'s [=Navigation/current entry index=] is not &minus;1.
413413

414414
1. Return |navigation|'s [=Navigation/entry list=][|navigation|'s [=Navigation/current entry index=]].
415415
</div>
416416

417417
<p algorithm>
418-
The <dfn attribute for="Navigation">current</dfn> getter steps are to return the [=Navigation/current entry=] for [=this=].
418+
The <dfn attribute for="Navigation">currentEntry</dfn> getter steps are to return the [=Navigation/current entry=] for [=this=].
419419
</p>
420420

421421
<div algorithm>
@@ -489,15 +489,15 @@ interface NavigationTransition {
489489
</dd>
490490
</dl>
491491

492-
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.
493493

494494
The <dfn attribute for="Navigation">transition</dfn> getter steps are to return [=this=]'s [=Navigation/transition=].
495495

496496
<hr>
497497

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}}.
499499

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}}.
501501

502502
A {{NavigationTransition}} has an associated <dfn for="NavigationTransition">finished promise</dfn>, which is an {{Promise}}.
503503

@@ -598,7 +598,7 @@ We also need to ensure that, if we start a new navigation, navigations which hav
598598

599599
We end up accomplishing all this using the following setup:
600600

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.
602602

603603
Each {{Navigation}} object has an associated <dfn for="Navigation">ongoing navigation signal</dfn>, which is an {{AbortSignal}} or null, initially null.
604604

@@ -614,7 +614,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
614614
* A <dfn for="navigation API method navigation">key</dfn>, a string or null
615615
* An <dfn for="navigation API method navigation">info</dfn>, a JavaScript value
616616
* 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
618618
* A <dfn for="navigation API method navigation">committed promise</dfn>, a {{Promise}}
619619
* A <dfn for="navigation API method navigation">finished promise</dfn>, a {{Promise}}
620620

@@ -625,7 +625,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
625625

626626
1. Let |committedPromise| and |finishedPromise| be [=a new promise|new promises=] created in |navigation|'s [=relevant Realm=].
627627

628-
1. Mark as handled |finishedPromise|. <!-- TODO: link once https://github.com/whatwg/webidl/pull/1090 is merged -->
628+
1. [=Mark as handled=] |finishedPromise|.
629629

630630
<div class="note" id="note-finished-promise-mark-as-handled">
631631
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
641641

642642
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|.
643643

644-
1. Assert: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
644+
1. [=Assert=]: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
645645

646646
1. Set |navigation|'s [=Navigation/upcoming non-traverse navigation=] to |ongoingNavigation|.
647647

@@ -653,7 +653,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
653653

654654
1. Let |committedPromise| and |finishedPromise| be [=a new promise|new promises=] created in |navigation|'s [=relevant Realm=].
655655

656-
1. Mark as handled |finishedPromise|. <!-- TODO: link once https://github.com/whatwg/webidl/pull/1090 is merged -->
656+
1. [=Mark as handled=] |finishedPromise|.
657657

658658
<p class="note">See <a href="#note-finished-promise-mark-as-handled">the previous discussion</a> as to why this is done.</p>
659659

@@ -667,11 +667,11 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
667667
<div algorithm>
668668
To <dfn for="Navigation">promote the upcoming navigation to ongoing</dfn> given a {{Navigation}} |navigation| and a string-or-null |destinationKey|:
669669

670-
1. Assert: |navigation|'s [=Navigation/ongoing navigation=] is null.
670+
1. [=Assert=]: |navigation|'s [=Navigation/ongoing navigation=] is null.
671671

672672
1. If |destinationKey| is not null, then:
673673

674-
1. Assert: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
674+
1. [=Assert=]: |navigation|'s [=Navigation/upcoming non-traverse navigation=] is null.
675675

676676
1. If |navigation|'s [=Navigation/upcoming traverse navigations=][|destinationKey|] [=map/exists=], then:
677677

@@ -695,15 +695,15 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
695695

696696
1. Otherwise,
697697

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.
699699

700-
1. Assert: |navigation|'s [=Navigation/upcoming traverse navigations=][|navigation|'s [=navigation API method navigation/key=]] [=map/exists=].
700+
1. [=Assert=]: |navigation|'s [=Navigation/upcoming traverse navigations=][|navigation|'s [=navigation API method navigation/key=]] [=map/exists=].
701701

702702
1. [=map/Remove=] |navigation|'s [=Navigation/upcoming traverse navigations=][|navigation|'s [=navigation API method navigation/key=]].
703703
</div>
704704

705705
<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|:
707707

708708
1. Set |navigation|'s [=navigation API method navigation/committed-to entry=] to |entry|.
709709

@@ -825,7 +825,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
825825

826826
1. [=Assert=]: |browsingContext| is not null.
827827

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>".
829829

830830
1. Let |ongoingNavigation| be the result of [=Navigation/setting the upcoming non-traverse navigation=] for |navigation| given |info| and |serializedState|.
831831

@@ -924,7 +924,7 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
924924
<div algorithm>
925925
<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>
926926

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|:
928928

929929
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}}.
930930

@@ -1230,11 +1230,11 @@ The <dfn attribute for="NavigationDestination">sameDocument</dfn> getter steps a
12301230
1. Set |destination|'s [=NavigationDestination/state=] to null.
12311231
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.
12321232
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).
12341234
</div>
12351235

12361236
<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):
12381238

12391239
1. Let |event| be the result of [=creating an event=] given {{NavigateEvent}}, in |navigation|'s [=relevant Realm=].
12401240
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
12491249
</div>
12501250

12511251
<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|:
12531253

12541254
1. [=Navigation/Promote the upcoming navigation to ongoing=] given |navigation| and |destination|'s [=NavigationDestination/key=].
12551255
1. Let |ongoingNavigation| be |navigation|'s [=Navigation/ongoing navigation=].
@@ -1292,9 +1292,9 @@ The <dfn attribute for="NavigationDestination">sameDocument</dfn> getter steps a
12921292
1. Let |endResultIsSameDocument| be true if |hadTransitionWhile| is true or |destination|'s [=NavigationDestination/is same document=] is true.
12931293
1. If |hadTransitionWhile| is true:
12941294
1. Let |fromEntry| be the [=Navigation/current entry=] for |navigation|.
1295-
1. Assert: |fromEntry| is not null.
1295+
1. [=Assert=]: |fromEntry| is not null.
12961296
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=].
12981298
<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>
12991299
1. If |endResultIsSameDocument| is true:
13001300
1. Let |tweakedPromisesList| be |event|'s [=NavigateEvent/navigation action promises list=].

0 commit comments

Comments
 (0)