-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Update the navigation API when a same-document reload occurs #10989
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for working on this! I'm curious if @rwlbuis is able to check this out as well.
This performs the subset of the "URL and history update steps" that are applicable to reload navigations, in the "inner `navigate` event firing algorithm". Closes whatwg#10621
1bad4e2
to
615797c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normative content looks good, thanks for working on this. Please be sure to fill out the template with the Chromium bug and some of the tests linked from #10621.
(If we are up for adding more tests, e.g. to test that popstate doesn't fire, that would be excellent. Maybe by completing the TODO in https://github.com/web-platform-tests/wpt/tree/master/navigation-api/ordering-and-transition#navigation-api-orderingtransition-tests to generically add popstate/hashchange test ordering to all those tests.)
For WebKit and Gecko bugs we can just link to the generic navigation API implementation bugs.
source
Outdated
@@ -102155,18 +102153,18 @@ location.href = '#foo';</code></pre> | |||
|
|||
<li><p>Invoke <span>WebDriver BiDi history updated</span> with <var>navigable</var>.</p></li> | |||
</ol> | |||
</li> | |||
</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo all these whitespace changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
As per the spec clarification, soft reloads should only update the navigation API entries but not fire history events. See whatwg/html#10989
Done
Added a test (see OP)
Done |
…50793) As per the spec clarification, soft reloads should only update the navigation API entries but not fire history events. See whatwg/html#10989
When performing a soft reload (
navigation.reload()
orlocation.reload()
), the navigation API entries need to be updated to reflect the new state.Note that
popstate
and other traversal-related side effects should not occur.Closes #10621
sourceElement
mozilla/standards-positions#1154(See WHATWG Working Mode: Changes for more details.)
/nav-history-apis.html ( diff )