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

@justinfagnani , 
> declarative custom elements proposal would need to templates associated with the declaration that would only describe instances once cloned.

That is one of way to implement DCE. Its template root would need the mode defined somehow. I thought of `shadowroot` attribute as one of way to define insulation behavior. And actually used it in `light-dom-element`. Not a most efficient way as once `template shadowroot=open` defined, it would immediately create an instance, while we need only template as you rightfully pointed. This template render is ignored and but its root reused  for attaching in component instance.  Kind OK for POC, but better to be fixed. 

I have delayed the fix in favor of defining the `mode` in DCE which not yet defined. There is another thread of "mode" values which is different from "open/closed" which could be applicable to DCD here. One of those to make CSS customizable from outside yet with own rules insulated within rootNode. Quite critical IMO to compete with CSS modules.   

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

Message ID: <whatwg/dom/issues/831/1214570568@github.com>

Received on Monday, 15 August 2022 03:18:33 UTC