Selaa lähdekoodia

don't ignore shadowRoot of hidden elements

Gildas 6 vuotta sitten
vanhempi
sitoutus
b179aa5750
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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, computedStyle);
 			getResourcesInfo(win, doc, element, options, data, elementHidden, computedStyle);
-			if (element.shadowRoot && !elementHidden) {
+			if (element.shadowRoot) {
 				const shadowRootInfo = {};
 				const shadowRootInfo = {};
 				element.setAttribute(SHADOW_ROOT_ATTRIBUTE_NAME, data.shadowRootsData.length);
 				element.setAttribute(SHADOW_ROOT_ATTRIBUTE_NAME, data.shadowRootsData.length);
 				data.shadowRootsData.push(shadowRootInfo);
 				data.shadowRootsData.push(shadowRootInfo);