javascript/selenium-core/scripts/htmlutils.js
function getEngineFor(inDocument) {
        if (allowNativeXPath &&
            nativeEngine.setDocument(inDocument).isAvailable()) {
            return nativeEngine;
        }

        var currentEngine = engines[currentEngineName];

        if (currentEngine &&
            currentEngine.setDocument(inDocument).isAvailable()) {
            return currentEngine;
        }

        return engines[defaultEngineName].setDocument(inDocument);
    }
function getEngineFor(inDocument) {
        if (allowNativeXPath &&
            nativeEngine.setDocument(inDocument).isAvailable()) {
            return nativeEngine;
        }

        var currentEngine = engines[currentEngineName];

        if (currentEngine &&
            currentEngine.setDocument(inDocument).isAvailable()) {
            return currentEngine;
        }

        return engines[defaultEngineName].setDocument(inDocument);
    }
function getEngineFor ( inDocument ) { if ( allowNativeXPath && nativeEngine . setDocument ( inDocument ) . isAvailable ( ) ) { return nativeEngine ; } var currentEngine = engines [ currentEngineName ] ; if ( currentEngine && currentEngine . setDocument ( inDocument ) . isAvailable ( ) ) { return currentEngine ; } return engines [ defaultEngineName ] . setDocument ( inDocument ) ; }
Returns the most sensible engine given the settings and the document
object.
Returns the most sensible engine given the settings and the document object .