Before this change, Chromium would fire hashchange asynchronously (after a task), and delay popstate until the load event. This means the event ordering could be either [hashchange, popstate], or [popstate, hashchange], depending on how long the document took to load. After this change, Chromium will match Firefox and always fire popstate immediately upon URL changes, i.e. the order will always be [popstate, hashchange].
Currently Chromium and Safari both have the nondeterministic delay-until-load behavior, whereas Firefox has the proposed deterministic behavior. We hope Safari will follow and adopt the deterministic behavior, since deterministic behavior is generally better for interop. We believe the compatibility risk here is minimal. Firefox has no reports of compat issues due to their timing. And sites can already observe both [popstate, hashchange] and [hashchange, popstate] orderings depending on network conditions; thus it should be quite hard for any sites to depend on the [hashchange, popstate] ordering which we are eliminating. We plan to launch this with a feature flag so that it can be remotely disabled using a Finch killswitch, just in case. And we will keep careful eye on any bug reports as this naturally makes its way through Canary/Dev/Beta channels.
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
As noted in the compat section, there is some risk here, although we believe it is small. We are using a base::Feature killswitch just in case this causes particular problems on Android WebView or elsewhere.
The usual DevTools ability to observe events is the only applicable thing here, and already exists.
DevTrial on desktop | 103 |
DevTrial on Android | 103 |
None
LGTM2
/Daniel
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/fb7c5349-9ad8-4bce-bafc-764055e18f37n%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/04fbe36a-19aa-53d6-29d8-2810e216b3fa%40gmail.com.