3 ms·
Shadow DOM is a mechanism by which a browser can inject a subtree into the DOM, but it won't be visible to JS. This was often used for things like custom eleme
by pyalot2 13y ago
Shadow DOM is a mechanism by which a browser can inject a subtree into the DOM, but it won't be visible to JS.
This was often used for things like custom elements (inputs and such). I presume it wasn't very popular to use the shadow dom in webkit.
Far as I recall, there's also talk about using the shadow dom for injecting foreign fragments into the DOM in a secure manner (web components). Although there's probably ways to achieve this without the full shadow dom.
- dasmoth 13y agoShadow DOM allows the contents of a component to be styled independently from the enclosing page. As far as I can tell, there currently isn't any other good way of doing robust, scoped CSS (short of iframes). I'll be very, very, sad if shadow DOM dies.