<link> load event should fire before pending parsing-blocking script is "unblocked" |
|
Issue descriptionAs per the large https://github.com/whatwg/html/pull/4031, it is now well-specified that the load event should be fire before the Document's script-blocking style sheet counter [1] is decremented, and scripting is unblocked. Note the script-blocking style sheet counter introduced in the specification is directly analogous to Blink's `pending_script_blocking_stylesheets_` counter [2]. Currently Chrome fires the load event sometime after the pending parsing-blocking script is run, which is confusing and now against the spec. Note: Firefox behaves correctly here, but Safari behaves like Chrome, and violates the spec. Also note: The task source for the <link> load/error events has changed from the DOM manipulation task source to the networking task source too. Triaging under Blink>Loader since I feel that is related to when we fire events, but it may be able to be classified better. WPTs for this are available at: https://github.com/web-platform-tests/wpt/pull/14899. ---- [1]: http://html.spec.whatwg.org/multipage/semantics.html#script-blocking-style-sheet-counter. [2]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/css/style_engine.h?sq=package:chromium&g=0&l=462 |
|
►
Sign in to add a comment |
|
Comment 1 by kouhei@chromium.org
, Jan 17 (6 days ago)