src/page.js
function xPath(xPathString) {
    var xResult = document.evaluate(xPathString, document, null, 0, null);
    var xNodes = [];
    var xRes = xResult.iterateNext();
    while (xRes) {
        xNodes.push(xRes);
        xRes = xResult.iterateNext();
    }

    return xNodes;
}
function xPath(xPathString) {
    var xResult = document.evaluate(xPathString, document, null, 0, null);
    var xNodes = [];
    var xRes = xResult.iterateNext();
    while (xRes) {
        xNodes.push(xRes);
        xRes = xResult.iterateNext();
    }

    return xNodes;
}
function xPath ( xPathString ) { var xResult = document . evaluate ( xPathString , document , null , 0 , null ) ; var xNodes = [ ] ; var xRes = xResult . iterateNext ( ) ; while ( xRes ) { xNodes . push ( xRes ) ; xRes = xResult . iterateNext ( ) ; } return xNodes ; }
Evaluates xPath on a page
@param {string} xPathString - The Xpath string to evaluate
@returns {Array.<HTMLElement>} - An array of the found HTML elements
Evaluates xPath on a page