There has been revived interest in standardizing shadow DOM and custom elements across all browsers. To that end we had a bunch of discussion online, met in April to discuss shadow DOM, and met earlier this month to discuss custom elements. There is agreement around shadow DOM now. host.attachShadow()
will give you a ShadowRoot
instance. And <slot>
elements can be used to populate the shadow tree with children from the host.
Building components that can stand the test of time is tough! Frameworks change, new fads emerge, and often we're left with an aging codebase that needs to be rewritten if we want to stay current. Polymer and Web Components aim to change this cycle by building on new platform primitives which will allow us to finally create interoperable components that work in an environment.
Read More >