Re: [whatwg/dom] Declarative Shadow DOM (#510)

I somehow like the idea now of retaining `shadowroot` in DOM after parsing to manipulate the shadowDOM of an element. But I thought of custom elements where they have their own templating system or they use their shadowDOM as basis of their behaviors and using `shadowroot` would inevitably create chaos within that element (at least within that element and not all of the same element). I think this needs to be addressed.

Although the pattern @treshugart gave is a bit of an anti-pattern, I think a good example here really is using a custom-element

```
const Hello = props => {
  <custom-element>
    {props.name}
  </custom-element>
}
```

Now some SSR lib would render the whole thing as this:
```
<custom-element>
  <shadowroot>
      <style>{`:host { border: 1px solid black; }`}</style>
      Hello, <slot></slot>!
  </shadowroot>
  Props value
</custom-element>
```




-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/510#issuecomment-340725386

Received on Tuesday, 31 October 2017 10:46:50 UTC