Skip to content

Instantly share code, notes, and snippets.

Created June 28, 2014 22:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2ef95d9989eed32d733b to your computer and use it in GitHub Desktop.
Save anonymous/2ef95d9989eed32d733b to your computer and use it in GitHub Desktop.
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