single-file-core 1.3.6 → 1.3.7

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.
@@ -91,7 +91,7 @@ function getProcessorHelperClass(utilInstance) {
91
91
  }
92
92
 
93
93
  replaceStylesheets(doc, stylesheets, options, resources) {
94
- const entries = Array.from(stylesheets);
94
+ const entries = Array.from(stylesheets).reverse();
95
95
  for (const [key, stylesheetInfo] of entries) {
96
96
  if (key.urlNode) {
97
97
  const name = "stylesheet_" + resources.stylesheets.size + ".css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -383,7 +383,7 @@
383
383
  event.stopPropagation();
384
384
  if (shadowRoot) {
385
385
  shadowRoot.addEventListener(GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, getAdoptedStylesheetsListener, {});
386
- shadowRoot.addEventListener(UNREGISTER_GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, () => shadowRoot.removeEventListener(getAdoptedStylesheetsListener), { once: true });
386
+ shadowRoot.addEventListener(UNREGISTER_GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, () => shadowRoot.removeEventListener(GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, getAdoptedStylesheetsListener), { once: true });
387
387
  const adoptedStyleSheets = Array.from(shadowRoot.adoptedStyleSheets).map(stylesheet => Array.from(stylesheet.cssRules).map(cssRule => cssRule.cssText).join("\n"));
388
388
  if (adoptedStyleSheets.length) {
389
389
  event.target.dispatchEvent(new CustomEvent(GET_ADOPTED_STYLESHEETS_RESPONSE_EVENT, { detail: { adoptedStyleSheets } }));