I am looking for a way to perform fulltext search on the DOM tree with JS. In two words, I would like to retrieve the list of text nodes which contain a given string.
In general DOM: For getting element by text in DOM
//*[text()='anytext']
or
//*[.='anytext']