lib/checks.js
function ajaxCallback(page, ph, oldUrl, options, callback) {
    // callback for page change
    switch(options) {
        case 1:
            // expect ajax
            pageDomHasChanged(page, ph, function (error, page, ph) {
                callback(error, page, ph);
            });
            break;
        case 2:
            // expect navigation
            pageHasChanged(page, oldUrl, function (error) {
                callback(error, page, ph);
            });
            break;
        default:
            // callback immediately
            callback(null, page, ph);
            break;
    }
}
function ajaxCallback(page, ph, oldUrl, options, callback) {
    // callback for page change
    switch(options) {
        case 1:
            // expect ajax
            pageDomHasChanged(page, ph, function (error, page, ph) {
                callback(error, page, ph);
            });
            break;
        case 2:
            // expect navigation
            pageHasChanged(page, oldUrl, function (error) {
                callback(error, page, ph);
            });
            break;
        default:
            // callback immediately
            callback(null, page, ph);
            break;
    }
}
function ajaxCallback ( page , ph , oldUrl , options , callback ) { // callback for page change switch ( options ) { case 1 : // expect ajax pageDomHasChanged ( page , ph , function ( error , page , ph ) { callback ( error , page , ph ) ; } ) ; break ; case 2 : // expect navigation pageHasChanged ( page , oldUrl , function ( error ) { callback ( error , page , ph ) ; } ) ; break ; default : // callback immediately callback ( null , page , ph ) ; break ; } }
Waits for a callback based on the options
@param page
@param ph
@param oldUrl
@param options
@param {pageCallback} callback
Waits for a callback based on the options