|
|
@@ -110,11 +110,12 @@ this.docHelper = this.docHelper || (() => {
|
|
|
const display = computedStyle.getPropertyValue("display");
|
|
|
const opacity = computedStyle.getPropertyValue("opacity");
|
|
|
const visibility = computedStyle.getPropertyValue("visibility");
|
|
|
- if (ascendantHidden && !options.ignoredTags.includes(element.tagName)) {
|
|
|
- if (elements.length) {
|
|
|
- const elements = Array.from(element.childNodes).filter(node => node instanceof win.HTMLElement);
|
|
|
- elements.forEach(element => element.setAttribute(REMOVED_CONTENT_ATTRIBUTE_NAME, ""));
|
|
|
- }
|
|
|
+ if (ascendantHidden) {
|
|
|
+ Array.from(element.childNodes).filter(node => node instanceof win.HTMLElement).forEach(element => {
|
|
|
+ if (!options.ignoredTags.includes(element.tagName)) {
|
|
|
+ element.setAttribute(REMOVED_CONTENT_ATTRIBUTE_NAME, "");
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
elementHidden = ascendantHidden || testHiddenElement(element, { display, opacity, visibility });
|
|
|
}
|