diff --git a/iron-list.html b/iron-list.html index e12e3d2b..5c62db09 100644 --- a/iron-list.html +++ b/iron-list.html @@ -941,7 +941,12 @@ // TODO(blasten): // First element child is item; Safari doesn't support children[0] // on a doc fragment. Test this to see if it still matters. - physicalItems[i] = inst.root.querySelector('*'); + var newItem = inst.root.querySelector('*'); + var templateSlotAttribute = this._userTemplate.getAttribute('slot'); + if (templateSlotAttribute) { + newItem.setAttribute('slot', templateSlotAttribute); + } + physicalItems[i] = newItem; this._itemsParent.appendChild(inst.root); } return physicalItems; diff --git a/test/fixtures/o-named-list.html b/test/fixtures/o-named-list.html new file mode 100644 index 00000000..6aef040c --- /dev/null +++ b/test/fixtures/o-named-list.html @@ -0,0 +1,24 @@ + + + + + + + + + + diff --git a/test/fixtures/slot-container.html b/test/fixtures/slot-container.html new file mode 100644 index 00000000..79491563 --- /dev/null +++ b/test/fixtures/slot-container.html @@ -0,0 +1,25 @@ + + + + + + + + + + diff --git a/test/index.html b/test/index.html index 55799623..8464c943 100644 --- a/test/index.html +++ b/test/index.html @@ -32,6 +32,7 @@ 'grid-changed.html?dom=shadow', 'bindings-host-to-item.html?dom=shadow', 'template-overload.html?dom=shadow', + 'named-slot.html?dom=shadow', 'scroll-offset.html?dom=shadow', 'basic.html?wc-shadydom=true&wc-ce=true', 'events.html?wc-shadydom=true&wc-ce=true', @@ -47,7 +48,8 @@ 'grid-changed.html?wc-shadydom=true&wc-ce=true', 'bindings-host-to-item.html?wc-shadydom=true&wc-ce=true', 'template-overload.html?wc-shadydom=true&wc-ce=true', - 'scroll-offset.html?wc-shadydom=true&wc-ce=true' + 'named-slot.html?wc-shadydom=true&wc-ce=true', + 'scroll-offset.html?wc-shadydom=true&wc-cez=true' ]); diff --git a/test/named-slot.html b/test/named-slot.html new file mode 100644 index 00000000..d58b6285 --- /dev/null +++ b/test/named-slot.html @@ -0,0 +1,106 @@ + + + + + + iron-list test + + + + + + + + + + + + + + + + + + + + +