Skip to content

Instantly share code, notes, and snippets.

Created Jun 28, 2014
Embed
What would you like to do?
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log('CONSOLE: ' + msg);
};
// your code...
page.content = "<script>setInterval(function(){console.log(!!window.callPhantom)}, 500);</script>";
setTimeout(function(){
phantom.exit();
}, 1800);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment