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

Test using location API to navigate to the current hash #32291

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

domenic
Copy link
Member

@domenic domenic commented Jan 7, 2022

Comment on lines +34 to +35
// These don't canonicalize to the current value of location.hash; the post-parsing version of
// "te<st" is "te%3Cst", uppercase.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

}, `Using location.hash = "${value}" must reset scroll position`);
}

for (const value of ["about:srcdoc#te<st", "about:srcdoc#te%3cst", "about:srcdoc#te%3Cst"]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this assumes you can navigate to about:srcdoc, but I don't think we have any allowance for that, do we? I think it ends up as a network error currently.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These iframes start on about:srcdoc (because I used a srcdoc iframe for the test), so this just causes a fragment navigation, which is allowed.

@domenic domenic merged commit 1e5972d into master Jan 12, 2022
@domenic domenic deleted the location-api-same-hash branch January 12, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants