Skip to content

Commit

Permalink
Only selects unnamed slot content from immediate children.
Browse files Browse the repository at this point in the history
  • Loading branch information
kj committed May 31, 2024
1 parent eab7fbf commit 17a38a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const MorphdomMixin = (superclass) => class extends superclass {

if (!this.shadowRoot && this['expandSlots']) {
const slotEl = document.createElement('div')
const slottedElements = root.querySelectorAll('[slot=""]')
const slottedElements = root.querySelectorAll(`${this.tagName.toLowerCase()} > [slot=""]`)
for (const value of slottedElements.values()) {
slotEl.appendChild(value)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enhance/morphdom-mixin",
"version": "1.1.3-next.0",
"version": "1.1.2",
"description": "Enhance mixin to add Morphdom DOM diffing to a Custom Element",
"type": "module",
"module": "/dist/index.js",
Expand Down

0 comments on commit 17a38a1

Please sign in to comment.