Closed jogibear9988 closed 8 months ago
Thanks for the bug! Two notes:
This explainer is out of date anyway, and I've added a note to that effect. The feature has been standardized, so MDN or the spec itself should be the authority. For example, the function is now called setHTML
and not setInnerHTML
.
The polyfill should work correctly as-is. Note that it explicitly (and for exactly this reason) adds a <pre>
tag around the contents, which triggers the body and avoids putting anything into the head, with a few exceptions that can't be avoided.
You can try the latest polyfill: https://github.com/EasyWebApp/declarative-shadow-dom-polyfill
With set innerHTML you could also assing, script, link and other tags, wich the dom parser will move into the "head" section