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 (custom elements minutes). 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. The shadow DOM specification will remain largely unchanged otherwise. Hayato is working on updates.
This is great, we can start implementing these changes in Gecko and ship them. Other browsers plan on doing the same.
Custom elements however is somewhat more astray. Here are some of the pain points:
The counter argument is that those algorithms are likely already harder than specified due to mutation events, several focus events that fire synchronously (!), and
Can we have upgrades and provide a consistent world view? This was the question that killed custom elements being done anytime soon. Once you accept upgrades, you accept that instances are created at a different time to when they get initialized. In this time difference observable changes happen to the tree and the wider world of DOM. If developers start depending on these differences for their own custom elements, they end up creating elements that cannot be reused, break when created through
document.createElement(), etc. (Feedback from Polymer indicated that developers of components frequently depend on attributes and children being present.)