Re: [WICG/webcomponents] Interaction between imperative slotting and declarative shadow DOM (Issue #967)

So I can think of two different processing models.
1. `initialelements` / `initialnodes` are features of `HTMLSlotElement`. In this case, `initialelements` / `initialnodes` are supported independent of declarative shadow DOM. This would mean that we'd have to define between when these attributes define the assigned nodes (probably until the first call to `assign()`?).
2. `initialelements` / `initialnodes` are features of declarative shadow DOM. In this case, `initialelements` / `initialnodes` are only supported within a declarative shadow DOM, and it substitutes `assign()` function calls after shadow host's children had been inserted.

One annoying thing about (1) is that we'd have to monitor any changes to the shadow host's child nodes over time, and update the currently assigned nodes. For (2), we'd have to think about whether slot assignment will be dynamically updated as more of shadow host's child nodes get parsed (i.e. allow streaming) or not. If we were to dynamically update the assigned nodes, it would have the same issue as (1) in that we'd effectively monitoring any changes to shadow host's child nodes.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/967#issuecomment-1268110096
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/967/1268110096@github.com>

Received on Wednesday, 5 October 2022 08:23:42 UTC