- From: Bradley Farias <notifications@github.com>
- Date: Tue, 24 Oct 2023 11:52:22 -0700
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 24 October 2023 18:52:27 UTC
Heya, just wanted to chime in that I was building a simple component that only shows 1 of its children at a time using `display:none` on dynamically generated `<slot>`s to avoid problems like in https://jsfiddle.net/tLc2znyh/ . I use manual slot assignment so I had to use a `MutationObserver` to mix `wc.children` and dynamic `slot.assign()` ( https://codepen.io/bradleymeck/pen/poxzXoE?editors=1001 ). Having a simpler way to do this would be great. I would note, in at least me scenario, even with a simplistic callback needing to re-layout due to slots is pretty wasteful and prone to some memory leakage in my tests (see `layout()` in codepen example) where I have to manually cross reference slot elements and their assignments so having better clarity on *WHERE* the node has been moved to would be ideal not just that it was added/removed. -- Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/809#issuecomment-1777834614 You are receiving this because you are subscribed to this thread. Message ID: <WICG/webcomponents/issues/809/1777834614@github.com>
Received on Tuesday, 24 October 2023 18:52:27 UTC