-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Issue with hashChange determination for NavigateEvent when dispatched through replaceState/pushState #10389
Comments
My instinct here is that the test and Chromium's implementation is wrong, and we should update them. I cannot find any evidence of this being intentional. |
That plan would align well with WebKit's current implementation. |
I started working on this and then I had second thoughts. I think this might have been intentional after all. The original explainer states:
Additionally, a large amount of example code does stuff like navigation.addEventListener("navigate", e => {
if (e.hashChange) {
// Assume this is the user clicking on a fragment link and ignore it.
return;
}
// Otherwise, process this with navigation interception.
}); I think changing how such code reacts to So now I am thinking we should update the spec to match Chromium's behavior and the tests... I am open to being persuaded otherwise, especially by web developers with experience using the navigation API. But I'll tentatively proceed with a spec patch. |
What is the issue with the HTML Standard?
When looking at for example navigate-event/navigate-history-pushState.html, the test expectation for hashChange is false. However from looking at the specification it should be true. It seems when using History API the determination is different, yet this does not seem reflected in the specification AFAICS.
The text was updated successfully, but these errors were encountered: