I'd like to use dom-repeat
to wrap a bunch of child nodes in <li>
tags. The problem is, the nodes I want to repeat are custom elements themselves, inserted via a slot, and it seems that dom-repeat only takes data passed via attributes.
What I want to do is:
<dom-module id="my-custom-element">
<template>
<section>
...
<ul>
<dom-repeat items="{{ TOP-LEVEL NODES IN LIST SLOT }}">
<template>
<li>{{ item }}</li>
</template>
</dom-repeat>
</ul>
</section>
</template>
</dom-module>
And using it:
<my-custom-element>
<ul slot="LIST">
<my-other-custom-element></my-other-custom-element>
<my-other-custom-element></my-other-custom-element>
<my-other-custom-element></my-other-custom-element>
</ul>
</my-custom-element>