Which elements support shadow DOM?
Is there a list somewhere of which HTML elements can and can’t have a shadow DOM?
If context object’s local name is not a valid custom element name,
span, then throw a
Here’s a quick example using
It’s worth calling out that
a are not on this list and will throw an error if you try to attach a shadow root to them. If you need to use them you'll probably need to look into either wrapping these elements or using a type extension.
Originally published at robdodson.me on January 13, 2019.