Skip to content

Commit 4a9fdaa

Browse files
committed
Editorial: consolidate non-traverse navigation checks more
This is a followup simplification enabled by c1bfdf1, as pointed out in #212 (comment).
1 parent c1bfdf1 commit 4a9fdaa

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

spec.bs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,6 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
785785

786786
<p class="note">It is important to perform this step early, since serialization can invoke web developer code, which in turn might change the state checked in later steps.</p>
787787

788-
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=Document/fully active=], then return [=an early error result=] for an "{{InvalidStateError}}" {{DOMException}}.
789-
790-
1. If [=this=]'s [=relevant global object=]'s [=associated Document=]'s <a spec="HTML">unload counter</a> is greater than 0, then return [=an early error result=] for an "{{InvalidStateError}}" {{DOMException}}.
791-
792788
1. Let |info| be |options|["{{NavigationOptions/info}}"] if it exists; otherwise, undefined.
793789

794790
1. Let |historyHandling| be "<a for="history handling behavior">`replace`</a>" if |options|["{{NavigationNavigateOptions/replace}}"] is true; otherwise, "<a for="history handling behavior">`default`</a>".
@@ -813,10 +809,6 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
813809

814810
1. If |current| is not null, then set |serializedState| to |current|'s [=session history entry/navigation API state=].
815811

816-
1. If [=this=]'s [=relevant global object=]'s [=associated Document=] is not [=Document/fully active=], then return [=an early error result=] for an "{{InvalidStateError}}" {{DOMException}}.
817-
818-
1. If [=this=]'s [=relevant global object=]'s [=associated Document=]'s <a spec="HTML">unload counter</a> is greater than 0, then return [=an early error result=] for an "{{InvalidStateError}}" {{DOMException}}.
819-
820812
1. Let |info| be |options|["{{NavigationOptions/info}}"] if it exists; otherwise, undefined.
821813

822814
1. Return the result of [=performing a non-traverse navigation API navigation=] given [=this=], |urlRecord|, |serializedState|, |info|, and "<a for="history handling behavior">`reload`</a>".
@@ -825,6 +817,10 @@ An <dfn>navigation API method navigation</dfn> is a [=struct=] with the followin
825817
<div algorithm>
826818
To <dfn>perform a non-traverse navigation API navigation</dfn> given a {{Navigation}} object |navigation|, a [=URL=] |url|, a [=serialized state=]-or-null |serializedState|, a JavaScript value |info|, and a <a spec="HTML">history handling behavior</a> |historyHandling|:
827819

820+
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}}.
821+
822+
1. If |navigation|'s [=relevant global object=]'s [=associated Document=]'s <a spec="HTML">unload counter</a> is greater than 0, then return [=an early error result=] for an "{{InvalidStateError}}" {{DOMException}}.
823+
828824
1. Let |browsingContext| be |navigation|'s [=relevant global object=]'s [=Window/browsing context=].
829825

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

0 commit comments

Comments
 (0)