Repository navigation
Always fire popstate and restore persisted state sync - #7815
Conversation
Closes #1792 by aligning with Gecko. The alternative model involved delaying popstate until after the load event, which is what WebKit and Blink do. But the Gecko model is simpler and has fewer edge cases around multiple state changes and such.
annevk
left a comment
There was a problem hiding this comment.
It's weird that hashchange wouldn't happen in the same task, but from the tests it does look like that is what happens.
One thing I wondered about while reading this is when "restore persisted state" runs. The way it's written now you could observe from the popstate event listener that nothing happened. But wouldn't it make more sense for it to run first?
|
I'm not really sure what makes more sense, but it generally seems interoperable that in the cases this change doesn't touch (i.e. cases where popstate would be after the load event anyway in Chromium and WebKit) everyone uses the order I guess we should try to expand the linked tests to also include scroll restoration if possible... seems hard though since all our traversal tests so far result in |
Closes #1792 by aligning with Gecko. The alternative model involved delaying popstate until after the load event, which is what Blink and WebKit do. But the Gecko model is simpler and has fewer edge cases around multiple state changes and such.
(See WHATWG Working Mode: Changes for more details.)
/browsing-the-web.html ( diff )