diff --git a/source b/source index 5052495dfbb..0838bab0812 100644 --- a/source +++ b/source @@ -99394,18 +99394,18 @@ interface NavigationHistoryEntry : EventTarget data-x="dom-NavigationOptions-info">info"], if it exists; otherwise, undefined.
-Let apiMethodTracker be the result of maybe setting the upcoming non-traverse API method - tracker for this given info and - serializedState.
Let apiMethodTracker be the result of setting up a navigate/reload API method tracker for this + given info and serializedState.
Navigate document's node
navigable to urlRecord using document, with historyHandling set to options["history
"] and history"], navigationAPIState set to
- serializedState.
Unlike location.assign()
and friends,
which are exposed across origin-domain boundaries,
@@ -99418,25 +99418,6 @@ interface NavigationHistoryEntry : EventTarget
Navigation
object itself (i.e., document).
If this's upcoming non-traverse API method tracker is - apiMethodTracker, then:
- -If the upcoming non-traverse API method tracker is still
- apiMethodTracker, this means that the navigate algorithm bailed out
- before ever getting to the inner navigate
event
- firing algorithm which would promote that upcoming API method tracker to ongoing.
Set this's upcoming non-traverse API method tracker to - null.
Return an early error result for
- an "AbortError
" DOMException
.
Return a navigation API method tracker-derived result for apiMethodTracker.
Let apiMethodTracker be the result of maybe setting the upcoming non-traverse API method - tracker for this given info and - serializedState.
Let apiMethodTracker be the result of setting up a navigate/reload API method tracker for this + given info and serializedState.
Reload document's node navigable with navigationAPIState set to - serializedState.
Return a navigation API method tracker-derived result for apiMethodTracker.
A navigation API method tracker-derived result for a navigation API method
- tracker is a NavigationResult
dictionary instance given by «[ "committed
" → apiMethodTracker's committed promise, "finished
" → apiMethodTracker's finished promise ]».
To compute the navigation API method tracker-derived result for a navigation + API method tracker-or-null apiMethodTracker:
+ +If apiMethodTracker is pending, then return an early error result for an
+ "AbortError
" DOMException
.
Return a NavigationResult
dictionary instance given by «[ "committed
" → apiMethodTracker's committed promise, "finished
" → apiMethodTracker's finished promise ]».
Ongoing API method tracker, a navigation API method tracker or null, initially null.
Upcoming non-traverse API method tracker, a navigation API method - tracker or null, initially null.
Upcoming traverse API method trackers, an ordered map from strings to navigation API method trackers, initially empty.
A finished promise, a promise
A pending, a boolean.
All this state is then managed via the following algorithms.
To maybe set the upcoming non-traverse API method tracker given a
- Navigation
navigation, a JavaScript value info, and a
- serialized state-or-null serializedState:
To set up a navigate/reload API method tracker given a Navigation
+ navigation, a JavaScript value info, and a serialized
+ state-or-null serializedState:
Let committedPromise and finishedPromise be new promises created in @@ -99891,7 +99880,7 @@ const p2 = navigation.navigate(url2).finished;
Let apiMethodTracker be a new navigation API method tracker with:
+Return a new navigation API method tracker with:
Assert: navigation's upcoming non-traverse API method - tracker is null.
If navigation does not have - entries and events disabled, then set navigation's upcoming - non-traverse API method tracker to apiMethodTracker.
- -If navigation has entries and events disabled, then
- committedPromise and finishedPromise will never fulfill (since we never
- create a NavigationHistoryEntry
object for such Document
s, and so we
- have nothing to resolve them with); there is no NavigationHistoryEntry
to apply
- serializedState to; and there is no navigate
- event to include info with. So, we don't need to track this API method call after
- all.
Return apiMethodTracker.
To promote an upcoming API method tracker to ongoing given a Navigation
- navigation and a string-or-null destinationKey:
Assert: navigation's ongoing API method tracker is - null.
If destinationKey is not null, then:
- -Assert: navigation's upcoming non-traverse API method - tracker is null.
If navigation's upcoming traverse API method - trackers[destinationKey] exists, then:
- -Set navigation's ongoing API method tracker to - navigation's upcoming traverse API method - trackers[destinationKey].
Remove navigation's upcoming - traverse API method trackers[destinationKey].
Otherwise:
- -Set navigation's ongoing API method tracker to - navigation's upcoming non-traverse API method tracker.
Set navigation's upcoming non-traverse API method tracker to - null.
To clean up a navigation API method tracker apiMethodTracker:
@@ -101303,16 +101235,42 @@ interface NavigationDestination { data-x="fire-navigate-prr-formDataEntryList">formDataEntryList (default null), an optional serialized state navigationAPIState (default - StructuredSerializeForStorage(null)), and an optional serialized + StructuredSerializeForStorage(null)), an optional serialized state-or-null classicHistoryAPIState (default - null): + null), and an optional navigation API method tracker-or-null apiMethodTrackerForNavigateOrReload:Let document be navigation's relevant global object's associated Document
.
Inform the navigation API about aborting navigation in
- navigation's relevant global object's associated Document
's node
- navigable.
If navigation has entries and events disabled, and + apiMethodTrackerForNavigateOrReload is not null:
+ +Set apiMethodTrackerForNavigateOrReload's pending to false.
Set apiMethodTrackerForNavigateOrReload to null.
If navigation has entries and events disabled, then
+ navigate()
and reload()
calls return promises that will never fulfill. We
+ never create a NavigationHistoryEntry
object for such Document
s, there
+ is no NavigationHistoryEntry
to apply serializedState to, and there is
+ no navigate
event to include info with. So, we
+ don't need to track this API method call after all. We need to check this after aborting
+ previous navigations, in case the Document
has became non-fully active
+ as a result of a navigateerror
event.
If document is not fully active, then return false.
Let event be the result of creating an event given
Return the result of performing the inner NavigateEvent
, in navigation's NavigationDestination {
navigate
event firing algorithm given
navigation, navigationType, event, destination,
- userInvolvement, sourceElement, formDataEntryList, and
- null.
NavigationType
navigationType, a NavigateEvent
event, a NavigationDestination
destination, a user
navigation involvement userInvolvement, an Element
-or-null
- sourceElement, an entry list-or-null formDataEntryList, and a
- string-or-null downloadRequestFilename:
+ sourceElement, an entry list-or-null formDataEntryList, a
+ string-or-null downloadRequestFilename, and an optional navigation API method
+ tracker-or-null apiMethodTracker (default null):
Assert: navigation's ongoing API method tracker is null.
Assert: navigation's upcoming non-traverse API method - tracker is null.
Assert: navigation's upcoming traverse API method trackers is empty.
Assert: apiMethodTracker is null.
Return true.
back()
, and forward()
will immediately fail when entries and events
- are disabled (since there are no entries to traverse to), and if our starting point is instead
- navigate()
or reload()
, then we avoided setting the
- upcoming non-traverse API method tracker in the first place.
+ are disabled (since there are no entries to traverse to).
- Let destinationKey be null.
Assert: navigation's ongoing API method tracker is + null.
If destination's entry is non-null, then set - destinationKey to destination's entry's key.
If destination's entry + is non-null:
-Assert: destinationKey is not the empty string.
Assert: apiMethodTracker is null.
-Promote an upcoming API method tracker to ongoing given - navigation and destinationKey.
apiMethodTracker is passed as an argument only for navigate()
and reload()
calls.
+
-
Let apiMethodTracker be navigation's ongoing API method - tracker.
Let destinationKey be destination's entry's key.
Assert: destinationKey is not the empty string.
If navigation's upcoming traverse API method + trackers[destinationKey] exists:
+ +Set apiMethodTracker to navigation's upcoming traverse API + method trackers[destinationKey].
Remove navigation's upcoming + traverse API method trackers[destinationKey].
If apiMethodTracker is not null, then set apiMethodTracker's pending to false.
Let navigable be navigation's relevant global object's navigable.
none
"), an optional Element
sourceElement (default null), and an
- optional boolean initialInsertion (default
- false):
+ data-x="navigation-source-element">sourceElement (default null), an optional
+ boolean initialInsertion (default false), and an
+ optional navigation API method tracker-or-null apiMethodTracker (default null):
Let cspNavigationType be "form-submission
" if
@@ -106345,9 +106324,10 @@ location.href = '#foo';
to sourceElement, formDataEntryList set to
entryListForFiring, destinationURL
- set to url, and navigationAPIState set to
- navigationAPIStateForFiring.
If continue is false, then return.
To reload a navigable navigable given an optional
serialized state-or-null navigationAPIState (default null) and an
+ data-x="reload-navigation-api-state">navigationAPIState (default null), an
optional user navigation involvement userInvolvement (default "none
"):
If continue is false, then return.