RESOLVED FIXED296420
setUnsafeHTML won't call the connectedCallback/constructor
https://bugs.webkit.org/show_bug.cgi?id=296420
Summary setUnsafeHTML won't call the connectedCallback/constructor
mic.gallego
Reported 2025-07-23 20:18:04 PDT
Hi, When using declarative shadow dom, Safari has an annoying bug where the constructor and connectedCallback are not called, making the feature basically unusable. You can reproduce it in this codepen: https://codepen.io/bakura10/pen/ByozpZL Chrome will have this: Constructor Connected Disconnected Constructor Connected Safari has this: Constructor Connected Disconnected Thanks!
Attachments
Reduction (616 bytes, text/html)
2025-07-30 20:44 PDT, Ryosuke Niwa
no flags
Luke Warlow
Comment 1 2025-07-29 07:53:41 PDT
This works correctly in latest Safari Tech Preview, so has already been fixed on trunk.
Radar WebKit Bug Importer
Comment 2 2025-07-30 20:19:12 PDT
Ryosuke Niwa
Comment 3 2025-07-30 20:23:27 PDT
This bug appears to be fixed on the latest main / STP 221.
Ryosuke Niwa
Comment 4 2025-07-30 20:44:25 PDT
Created attachment 476229 [details] Reduction
Ryosuke Niwa
Comment 5 2025-07-30 20:52:10 PDT
EWS
Comment 6 2025-07-30 22:12:47 PDT
Committed 298069@main (5a7c64a0cf07): <https://commits.webkit.org/298069@main> Reviewed commits have been landed. Closing PR #48757 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.