Procházet zdrojové kódy

retrieve shadowRoot only if the element is visible

Gildas před 6 roky
rodič
revize
e6c72a5616
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      lib/single-file/single-file-helper.js

+ 1 - 1
lib/single-file/single-file-helper.js

@@ -134,7 +134,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
 				}
 			}
 			getResourcesInfo(win, doc, element, options, data, elementHidden);
-			if (element.shadowRoot) {
+			if (element.shadowRoot && !elementHidden) {
 				const shadowRootInfo = {};
 				element.setAttribute(SHADOW_ROOT_ATTRIBUTE_NAME, data.shadowRootsData.length);
 				data.shadowRootsData.push(shadowRootInfo);