Skip to content

Conversation

@TimvdLippe
Copy link
Contributor

@TimvdLippe TimvdLippe commented Jan 18, 2026

When implemented as specced 1, it fails WPT test
/html/semantics/document-metadata/the-style-element/style_load_event.html
(among others). While parsing elements, it runs the "children changed steps".
However, since the element is still on the stack of open elements, it also then
runs when popped off.

This leads to multiple invocations of the algorithm and thus multiple load events.
Instead, it should mirror what's done for connected/disconnected cases where
it already takes care of this scenario.

  • At least two implementers are interested (and none opposed):
  • Tests are written and can be reviewed and commented upon at:
    • /html/semantics/document-metadata/the-style-element/style_load_event.html
    • /css/cssom/HTMLStyleElement-load-event.html
    • /css/css-fonts/font-display/font-display-failure-fallback.html
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


/semantics.html ( diff )

…open elements


When implemented as specced [1], it fails WPT test
`/html/semantics/document-metadata/the-style-element/style_load_event.html`
(among others). While parsing elements, it runs the "children changed steps".
However, since the element is still on the stack of open elements, it also then
runs when popped off.

This leads to multiple invocations of the algorithm and thus multiple load events.
Instead, it should mirror what's done for connected/disconnected cases where
it already takes care of this scenario.

[1]: servo/servo#41986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant