javascript/selenium-core/xpath/xpath.js
function xpathCollectDescendants(nodelist, node, opt_tagName) {
  if (opt_tagName && node.getElementsByTagName) {
    copyArray(nodelist, node.getElementsByTagName(opt_tagName));
    return;
  }
  for (var n = node.firstChild; n; n = n.nextSibling) {
    nodelist.push(n);
    xpathCollectDescendants(nodelist, n);
  }
}
function xpathCollectDescendants(nodelist, node, opt_tagName) {
  if (opt_tagName && node.getElementsByTagName) {
    copyArray(nodelist, node.getElementsByTagName(opt_tagName));
    return;
  }
  for (var n = node.firstChild; n; n = n.nextSibling) {
    nodelist.push(n);
    xpathCollectDescendants(nodelist, n);
  }
}
function xpathCollectDescendants ( nodelist , node , opt_tagName ) { if ( opt_tagName && node . getElementsByTagName ) { copyArray ( nodelist , node . getElementsByTagName ( opt_tagName ) ) ; return ; } for ( var n = node . firstChild ; n ; n = n . nextSibling ) { nodelist . push ( n ) ; xpathCollectDescendants ( nodelist , n ) ; } }
Local utility functions that are used by the lexer or parser.
Local utility functions that are used by the lexer or parser .