- From: Emilio Cobos Álvarez <notifications@github.com>
- Date: Wed, 05 Aug 2020 05:52:45 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 5 August 2020 12:52:58 UTC
@calebdwilliams I think for the dialog usecase named slots are a reasonable solution. You then could do `slot[name="cancel"]::slotted(button) { whatever }` or what not. Introducing a particular part-like attribute definitely mitigates the "now all elements need to look at all their ancestors for slots", for sure (at the cost of adding one more part-like attribute, which is also a bit of an annoyance because it involves one extra branch in all attribute mutations, but probably not a huge issue). That being said, allowing arbitrary access to the slotted DOM is a bit fishy. That way you start depending on the shape of your slotted DOM tree and that reintroduces the same issue that you're trying to solve with shadow DOM in the first place, which is making an isolated, reusable component. I think that's the point that @catastrophe is making, which I agree with. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/889#issuecomment-669175057
Received on Wednesday, 5 August 2020 12:52:58 UTC