Skip to content

Instantly share code, notes, and snippets.

@rahul-desai3
Created August 20, 2015 21:58
Show Gist options
  • Save rahul-desai3/c41b0794712ac5d385f8 to your computer and use it in GitHub Desktop.
Save rahul-desai3/c41b0794712ac5d385f8 to your computer and use it in GitHub Desktop.
var webshot = require('../lib/webshot');
var options = {
shotSize: {
width: 1024,
height: 'all'
},
script: function() {
window.onload = function() {
if (window.callPhantom === 'function') {
window.callPhantom('takeShot');
}
};
}
};
webshot('cordbloodbanking.com', './cordbloodbanking.png', options, function(err) {
if (err) return console.log(err);
console.log('OK');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment