Skip to content

Commit 5828aa9

Browse files
committed
Storing notes ahead of merge
1 parent 0352eed commit 5828aa9

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

source

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82975,32 +82975,47 @@ interface <dfn>BarProp</dfn> {
8297582975
</ol>
8297682976

8297782977
<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.
8297882980
</li>
8297982981

8298082982
JAKE-TODO: YOU ARE HERE - time to set the correct history entry and everything that comes with that.
82981-
</ol>
8298282983

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>
8298482996
</li>
8298582997
</ol>
8298682998
</li>
8298782999

8298883000
Map should be agent to (document, list of algorithm steps)
8298983001

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
8299083010
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+
8300483019
TODO: on a second pass, incorporate https://html.spec.whatwg.org/#traverse-the-history
8300583020
</ol>
8300683021

0 commit comments

Comments
 (0)