RESOLVED CONFIGURATION CHANGED Bug 56436
Dynamically created <style> element does not fire load event as per HTML5 spec
https://bugs.webkit.org/show_bug.cgi?id=56436
Summary Dynamically created <style> element does not fire load event as per HTML5 spec
Scott Kyle
Reported 2011-03-15 17:47:59 PDT
Below is taken from the spec (http://dev.w3.org/html5/spec/Overview.html#the-style-element): "Once the attempts to obtain the style sheet's critical subresources, if any, are complete, or, if the style sheet has no critical subresources, once the style sheet has been parsed and processed, the user agent must, if the loads were successful or there were none, queue a task to fire a simple event named load at the style element, or, if one of the style sheet's critical subresources failed to completely load for any reason (e.g. DNS error, HTTP 404 response, a connection being prematurely closed, unsupported Content-Type), queue a task to fire a simple event named error at the style element. Non-network errors in processing the style sheet or its subresources (e.g. CSS parse errors, PNG decoding errors) are not failures for the purposes of this paragraph."
Attachments
test case (241 bytes, text/html)
2022-08-20 01:09 PDT, Ryosuke Niwa
no flags
Gavin Peters
Comment 1 2011-03-21 12:21:54 PDT
I have set aside time this week to peek at this. Hopefully I"ll have something soon.
Eric Seidel (no email)
Comment 3 2012-01-20 18:21:27 PST
This reminds me of the recent work on link elements firing load events.
Ahmad Saleem
Comment 4 2022-08-19 23:32:52 PDT
Safari Technology Preview 151 seems to pass this test case: https://wpt.fyi/results/html/semantics/document-metadata/the-style-element/style_load_event.html?label=master&label=experimental&aligned&view=subtest&q=style%20load%20event Is something else needed here or I am looking at wrong test case? Thanks!
Ryosuke Niwa
Comment 5 2022-08-20 01:09:19 PDT
Created attachment 461755 [details] test case This seems to be working now.
Note You need to log in before you can comment on or make changes to this bug.