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
<p class="note">This is only done for the <span>traversable navigable</span>, as all nested <span data-x="navigable">navigables</span> will be part of the same <span>browsing session</span>.</p>
82978
+
82979
+
JAKE-TODO: This seems wrong for cross-thread access.
82978
82980
</li>
82979
82981
82980
82982
JAKE-TODO: YOU ARE HERE - time to set the correct history entry and everything that comes with that.
82981
-
</ol>
82982
82983
82983
-
<p class="note">Steps are grouped into <span data-x="agent">agents</span> to avoid synchronously observable things being out of sync.</p>
82984
+
<li><p>If <var>navigable</var>'s <span data-x="nav-current-history-entry">current session history entry</span> is <var>targetEntry</var>, then abort these steps.</p></li>
82985
+
82986
+
<li>
82987
+
<p>If <var>navigable</var>'s <span data-x="nav-displayed-history-entry">displayed session history entry</span> is <var>targetEntry</var>, then set <var>navigable</var>'s <span data-x="nav-current-history-entry">current session history entry</span> to <var>targetEntry</var> and abort these steps.</p>
82988
+
82989
+
<p class="note">For example, if traversing back results in the <span data-x="nav-displayed-history-entry">displayed</span> and <span data-x="nav-current-history-entry">current</span> session history entries becoming out of sync (due to a 204 response), traversing forward would hit the case above where they become in sync again, but there's no further action to perform.</p>
82990
+
</li>
82991
+
82992
+
YOU ARE HERE: spec the two phase approach, where we initially check if something is eligable for navigation before starting (allowed to navigate + unload prompts)
82993
+
82994
+
<li><p></p></li>
82995
+
</ol>
82984
82996
</li>
82985
82997
</ol>
82986
82998
</li>
82987
82999
82988
83000
Map should be agent to (document, list of algorithm steps)
82989
83001
83002
+
"Allowed to navigate" covers any kind of session history change
83003
+
May go deep but only if document will remain the same
83004
+
"Unload prompt" covers cases where document will change
83005
+
If doc will change, fire event in that context and all others
83006
+
83007
+
Check allowed to navigate without posting tasks (can just look up current history entry) - there's a race here but who cares. Or do we need displayed entry??
83008
+
current history entry is only ever set async
83009
+
If not allowed, bail
82990
83010
For each history entry list:
82991
-
Post task to document: (TODO: coalese these to agents)
82992
-
Update history length and indexes
82993
-
If history items are the same, bail.
82994
-
TODO: check for pending step
82995
-
If doc states are not the same:
82996
-
Discard etc etc
82997
-
Set history item:
82998
-
Scroll position etc etc
82999
-
If the documents are the same between current and target:
83000
-
Go through nested lists
83001
-
83002
-
83003
-
TODO: also update history.length & indexes
83011
+
Post task to document:
83012
+
Update history length and index
83013
+
If current history items are the same, continue.
83014
+
Update current entry?? (or need to do this in parallel?)
83015
+
If displayed history item needs changing, do that.
83016
+
If that means changing docs, do the discarding stuff.
83017
+
83018
+
83004
83019
TODO: on a second pass, incorporate https://html.spec.whatwg.org/#traverse-the-history
0 commit comments