B2G/gecko/accessible/tests/mochitest/name/markup.js
/**
 * Helper method to evaluate xpath expression.
 */
Helper method to evaluate xpath expression.
Helper method to evaluate xpath expression .
function evaluateXPath(aNode, aExpr, aResolver)
{
  var xpe = new XPathEvaluator();
  var resolver = aResolver;
  if (!resolver) {
    var node = aNode.ownerDocument == null ?
      aNode.documentElement : aNode.ownerDocument.documentElement;
    resolver = xpe.createNSResolver(node);
  }
  var result = xpe.evaluate(aExpr, aNode, resolver, 0, null);
  var found = [];
  var res;
  while (res = result.iterateNext())
    found.push(res);
  return found;
}
function evaluateXPath ( aNode , aExpr , aResolver ) { var xpe = new XPathEvaluator ( ) ; var resolver = aResolver ; if ( ! resolver ) { var node = aNode . ownerDocument == null ? aNode . documentElement : aNode . ownerDocument . documentElement ; resolver = xpe . createNSResolver ( node ) ; } var result = xpe . evaluate ( aExpr , aNode , resolver , 0 , null ) ; var found = [ ] ; var res ; while ( res = result . iterateNext ( ) ) found . push ( res ) ; return found ; }
Helper method to evaluate xpath expression.
Helper method to evaluate xpath expression .