code: function findFirstTextNode(node) {
            var walker;
  
            if (node) {
              walker = new TreeWalker(node, node);
  
              for (node = walker.current(); node; node = walker.next()) {
                if (node.nodeType === 3) {
                  return node;
                }
              }
            }
          }
docs: Finds the first text node in the specified node