Bug 239729 - Always fire popstate sync
Summary: Always fire popstate sync
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: History (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-25 09:47 PDT by Domenic Denicola
Modified: 2022-06-10 08:39 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Domenic Denicola 2022-04-25 09:47:52 PDT
Currently Blink and WebKit both delay popstate events that would occur before the load event, and queue them up to fire after the load event.

This causes undesirable nondeterminism, as if you change a page's fragment before the load event, sometimes you will get events in the order [popstate, hashchange], and sometimes [hashchange, popstate], depending on how long it takes for the page to load.

Firefox has a simpler model of always firing popstate synchronously. We are speccing that in https://github.com/whatwg/html/pull/7815 and Chromium will be working to align in https://bugs.chromium.org/p/chromium/issues/detail?id=1254926 / https://chromium-review.googlesource.com/c/chromium/src/+/3580022 . (Note that the current spec, before that spec PR, matched no browser.)

Web platform tests are available at https://github.com/web-platform-tests/wpt/pull/33746 .
Comment 1 Radar WebKit Bug Importer 2022-05-02 09:48:19 PDT
<rdar://problem/92613897>