RE: [webcomponents] How about let's go with slots?

From: Justin Fagnani [mailto:justinfagnani@google.com] 

> They're not equivalent, because any element can have the right content-slot value, but with tag names, only one (or maybe N) names would be supported.

Hmm, I don't understand, and fear we might be talking past each other. Can you give an example where content-slot works but tag names do not? For example https://github.com/w3c/webcomponents/blob/gh-pages/proposals/Proposal-for-changes-to-manage-Shadow-DOM-content-distribution.md#proposal-part-1-syntax-for-named-insertion-points gets translated from

<combo-box>
  <icon></icon>
  <dropdown>
    … Choices go here …
  </dropdown>
</combo-box>

Your stated sentence doesn't make much sense to me; you can have multiple elements with the same tag name. Literally, just take any example you can write <x content-slot="y"> ... </x> and replace those with <y> and </y>.

Received on Tuesday, 19 May 2015 01:35:10 UTC