Various refactorings needed for bug fix (#119)
Various refactorings needed for bug fix (#119)

Moved TreeWalker creation for text nodes into function
Exposed isNodeVisible for internal usage.

Co-authored-by: Ernesto Izquierdo Clua <ebcd00bf2045ee53f8b6b28a88dff248bd961742@google.com>
GoogleChromeLabs/text-fragments-polyfill,GoogleChromeLabs/text-fragments-polyfill