lib/capturejs.js
function saveImage(rect) {
        if (DEBUG && rect && !rect.bottom) inspectArgs("saveImage: ", rect);

        if (rect && typeof rect.bottom === "number") {
            phPage.property("clipRect", rect);
        }

        // Set a timeout to give the page a chance to render.
        setTimeout(function () {
            phPage.render(option.output)
                  .then(function () {
                      phInstance.exit();
                      // process.removeListener("uncaughtException", onUncaughtException);
                      process.nextTick(callback);
                  });
        }, option.renderdelay || 250);
    }
function saveImage(rect) {
        if (DEBUG && rect && !rect.bottom) inspectArgs("saveImage: ", rect);

        if (rect && typeof rect.bottom === "number") {
            phPage.property("clipRect", rect);
        }

        // Set a timeout to give the page a chance to render.
        setTimeout(function () {
            phPage.render(option.output)
                  .then(function () {
                      phInstance.exit();
                      // process.removeListener("uncaughtException", onUncaughtException);
                      process.nextTick(callback);
                  });
        }, option.renderdelay || 250);
    }
function saveImage ( rect ) { if ( DEBUG && rect && ! rect . bottom ) inspectArgs ( "saveImage: " , rect ) ; if ( rect && typeof rect . bottom === "number" ) { phPage . property ( "clipRect" , rect ) ; } // Set a timeout to give the page a chance to render. setTimeout ( function ( ) { phPage . render ( option . output ) . then ( function ( ) { phInstance . exit ( ) ; // process.removeListener("uncaughtException", onUncaughtException); process . nextTick ( callback ) ; } ) ; } , option . renderdelay || 250 ) ; }
Output the saved image to the specified file.
Output the saved image to the specified file .