single-file-core 1.14.2 → 1.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/core/index.js +7 -7
  2. package/package.json +1 -1
package/core/index.js CHANGED
@@ -1717,13 +1717,6 @@ class Processor {
1717
1717
  if (shadowRootData.serializable) {
1718
1718
  templateElement.setAttribute(SHADOWROOT_SERIALIZABLE, shadowRootData.serializable);
1719
1719
  }
1720
- if (shadowRootData.adoptedStyleSheets && shadowRootData.adoptedStyleSheets.length) {
1721
- shadowRootData.adoptedStyleSheets.forEach(stylesheetContent => {
1722
- const styleElement = doc.createElement("style");
1723
- styleElement.textContent = stylesheetContent;
1724
- templateElement.appendChild(styleElement);
1725
- });
1726
- }
1727
1720
  const shadowDoc = util.parseDocContent(shadowRootData.content);
1728
1721
  if (shadowDoc.head) {
1729
1722
  const metaCharset = shadowDoc.head.querySelector("meta[charset]");
@@ -1758,6 +1751,13 @@ class Processor {
1758
1751
  }
1759
1752
  });
1760
1753
  }
1754
+ if (shadowRootData.adoptedStyleSheets && shadowRootData.adoptedStyleSheets.length) {
1755
+ shadowRootData.adoptedStyleSheets.forEach(stylesheetContent => {
1756
+ const styleElement = doc.createElement("style");
1757
+ styleElement.textContent = stylesheetContent;
1758
+ templateElement.appendChild(styleElement);
1759
+ });
1760
+ }
1761
1761
  processElement(templateElement);
1762
1762
  if (element.firstChild) {
1763
1763
  element.insertBefore(templateElement, element.firstChild);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",