Skip to content

Commit

Permalink
Append imported component head childNodes into importing DOM's head i…
Browse files Browse the repository at this point in the history
…f present (closes #5)
  • Loading branch information
alexyuly committed Oct 20, 2024
1 parent 4d4f01d commit 7e7119b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ async function applyImportsToDomElement(domElement, context) {
childrenSlot.replaceWith(...importedElement.childNodes);
}

domElement.head?.append(...importDom.window.document.head.childNodes);
importedElement.replaceWith(...importDom.window.document.body.childNodes);
await applyImportsToDomElement(importDom.window.document.body, context);
}
Expand Down

0 comments on commit 7e7119b

Please sign in to comment.