code: function hasDirectTextDescendantTreeWalker() {
          var treeWalker = ownerDocument.createTreeWalker(element,
                                                          NodeFilter.SHOW_TEXT,
                                                          null,
                                                          false);
          while (treeWalker.nextNode()) {
              var resultElement = treeWalker.currentNode;
              var parent = resultElement.parentNode;
              // Handle elements hosted in <template>.content.
              parent = parent.host || parent;
              var tagName = parent.tagName.toLowerCase();
              var value = resultElement.nodeValue.trim();
              if (value && tagName !== 'script' && element !== resultElement)
                  return true;
          }
          return false;
      }
docs: Determines whether element has a text node as a direct descendant.
  This method uses TreeWalker as a fallback (at time of writing no version
  of IE (including IE11) supports XPath in the HTML DOM).
  @return {boolean}