Treewalker's NodeFilter.SHOW_TEXT not returning text from non HTML tags

Viewed 16

Does document.createTreeWalker parse only valid DOM elements ?

let allTextNodes = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT);

For example at : https://www.crunchbase.com/organization/olivia-ai-inc - does it not return text within tags like field-formatter ?

<field-formatter _ngcontent-sc470="" linkcolor="primary">
...
</field-formatter>
0 Answers
Related