fix(text selector): ignore NOSCRIPT elements (#15887)
These are usually not rendered, and some sites have very big content inside, for example full page markup.
This commit is contained in:
parent
92d65ab3e7
commit
fd21852b01
|
|
@ -76,7 +76,7 @@ export function createRegexTextMatcher(source: string, flags?: string): TextMatc
|
|||
}
|
||||
|
||||
export function shouldSkipForTextMatching(element: Element | ShadowRoot) {
|
||||
return element.nodeName === 'SCRIPT' || element.nodeName === 'STYLE' || document.head && document.head.contains(element);
|
||||
return element.nodeName === 'SCRIPT' || element.nodeName === 'NOSCRIPT' || element.nodeName === 'STYLE' || document.head && document.head.contains(element);
|
||||
}
|
||||
|
||||
export type ElementText = { full: string, immediate: string[] };
|
||||
|
|
|
|||
Loading…
Reference in a new issue