Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not clear purpose of early return in "finalize a same-document navigation" #10274

Open
kalenikaliaksandr opened this issue Apr 11, 2024 · 1 comment

Comments

@kalenikaliaksandr
Copy link

kalenikaliaksandr commented Apr 11, 2024

What is the issue with the HTML Standard?

Step 2 of "finalize a same-document navigation":

If targetNavigable's active session history entry is not targetEntry, then return.

Following sequence of steps results in missing session history entry because first history.pushState() is canceled by the second one:

  1. history.pushState() puts "finalize a same-document navigation" onto session history traversal queue.
  2. history.pushState() puts "finalize a same-document navigation" onto session history traversal queue.
  3. first "finalize a same-document navigation" early returns because active SHE != targetEntry, because active SHE was changed twice.

@domenic @domfarolino any chance you know why early return on step 2 exists? I think the issue could be fixed by removing this step, but maybe I am not aware of why it was added.

@domfarolino
Copy link
Member

Just a note for posterity, this seems quite related to #10232, which exercises the same early-return condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants