- From: CaptGrumpyPants <notifications@github.com>
- Date: Fri, 09 Feb 2018 14:39:30 +0000 (UTC)
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 9 February 2018 14:39:53 UTC
@PaulHMason I would be OK with that but for extension purposes I prefer the interface concept @rniwa had mentioned more for the reasons provided. The slot concept works fantastically for more generic web components but in the case of a more specific slotting concept it becomes excess when there is an element type designed for the slot. I have attempted: - Having the child element define its slot attribute: Though this works....its not very efficient - Having the parent scan its children in the constructor and set the slots on particular element types: Although a little better, this does not handle dynamically added elements well, even via MutationObserver. - Having the developers add the boilerplate `slot="slotLocation"` to the custom children: It can easily be forgotten due to redundancy. When we have an parent `<my-element>` with a child `<my-element-info>`, they may miss the required `<my-element-info slot="info">`. Being able to define the slot via interface would be very powerful indeed and reduce redundancy in more complex elements. -- 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/726#issuecomment-364451495
Received on Friday, 9 February 2018 14:39:53 UTC