Skip to content

Instantly share code, notes, and snippets.

@t-ashula
Created January 1, 2014 05:21
Show Gist options
  • Save t-ashula/8205322 to your computer and use it in GitHub Desktop.
Save t-ashula/8205322 to your computer and use it in GitHub Desktop.
phantomjs-node set('onInitialized') crash PhantomJS
var phantom = require('phantom');
phantom.create(function (ph) {
ph.createPage(function (page) {
page.set('onInitialized', function () {});
page.open('about:blank', function () {
console.log('onOpen');
page.evaluate(function () {
return document.URL;
}, function (r) {
console.log('onOpen.evaluate=>',r);
ph.exit();
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment