single-file-core 1.5.70 → 1.5.71

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.5.70",
3
+ "version": "1.5.71",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -82,7 +82,7 @@
82
82
  const observedElements = new Map();
83
83
 
84
84
  let dispatchScrollEvent;
85
- let adoptedStylesheetsData = new Map();
85
+ let adoptedStylesheetsData = new WeakMap();
86
86
 
87
87
  init();
88
88
  new MutationObserver(init).observe(document, { childList: true });
@@ -496,7 +496,6 @@
496
496
  shadowRoot.addEventListener(GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, getAdoptedStylesheetsListener, { capture: true });
497
497
  shadowRoot.addEventListener(UNREGISTER_GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, () => {
498
498
  shadowRoot.removeEventListener(GET_ADOPTED_STYLESHEETS_REQUEST_EVENT, getAdoptedStylesheetsListener);
499
- adoptedStylesheetsData.clear();
500
499
  }, { once: true });
501
500
  const adoptedStyleSheets = Array.from(shadowRoot.adoptedStyleSheets).map(stylesheet => {
502
501
  if (adoptedStylesheetsData.has(stylesheet)) {