Re: [csswg-drafts] [css-scoping] Proposal: Allow <slot> with LightDOM Web Components (#10420)

Thanks for your questions @Westbrook 

> Do you see adding new arguments to the appendChild() method? Or do you see adding a new appendSomething() method to use alternatively?

The `this.appendChild(...)` used in the example is just a placeholder as we cannot answer how (and where) we would append the (updated) children, this is up for discussion I’d say. Either a new method like `appendSomething()` (or `render()` to imply that we re-render the template with updated children/slots maybe).

> How would page with your custom element know how to interact with these updated DOM realities?
This is also a good question. I think what is exposed to the page is either:

1.  … just the LightDOM children which are masked by a rendered composed tree of the template with the slotted content. I know that this sounds a lot like what ShadowDOM is already doing, but I imagine that in contrast to the ShadowDOM this tree has no boundary at all. It behaves almost like a dynamically templating.
2. … a new way to construct a flat-tree where the children and the template /w slots are hooked into, but just the updated template being rendered/visible to the page similar to 1). /cc @andruud 

In either way the page would have access to the LightDOM children of the custom element.



-- 
GitHub Notification of comment by raphaelokon
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10420#issuecomment-2168113338 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 14 June 2024 13:58:42 UTC