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

> I think this should be considered in conjunction of what declarative syntax for custom elements (w3c/webcomponents#135) as well as template instantiation (whatwg/html#2254) would look like because we surely don't want to haver 3-4 slightly different ways to define & use a template.

I agree we don't want multiple slightly different ways. I don't think these collide in any significant way; it seems like they all work together fine?

Auto-filling the shadow DOM of a custom element looks good as it is; you wouldn't want to somehow tie this into `shadowroot`.  So long as `shadowroot` and `template` parse their contents the same, which I think they should, these two complement each other; `shadowroot` for manually attaching a single shadow root to an arbitrary element, `registerElement()` + `template` for automatically attaching a particular shadow root to every element of a given name.

If we add `template` variables that work for an arbitrary `template` sitting in the DOM, then they should work equally in a `shadowroot`.  If they're somehow attached to custom elements more explicitly (so there's some scoping of variables, rather than just JS global scope?), then it wouldn't work for either a lone `template` or a `shadowroot`, still consistent between the two.

Does anything about these two scenarios particularly concern you?

-- 
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-331981535

Received on Monday, 25 September 2017 19:07:21 UTC