Node.js and phantom issue

gotInergoxNet

New Member
I'm playing around with Node.js and the node phantom module that is available. But I seem to be stuck at a basic level, and can't get this basic piece of code to work:\[code\]var phantom = require('phantom');phantom.create(function(ph) { return ph.createPage(function(page) { return page.open("http://www.google.com", function(status) { console.log("opened google? ", status); return page.evaluate((function() { return document.title; }), function(result) { console.log('Page title is ' + result); return ph.exit(); }); }); });});\[/code\]I can't really figure out why the console messages don't appear? This happen to be in some phantom scope, I guess, but would it be possible for me to have the messages be parsed on to node? Or is the problem something completely else?
 
Back
Top