alexscheelmeyer / node-phantom

bridge to PhantomJS from Node.js
317 stars 117 forks source link

first time execute ph.createPage , socket.io seems not prepared #110

Open zhouseahe opened 10 years ago

zhouseahe commented 10 years ago

first time I run

ph.createPage(function(err,page){
   // no code run here 
});

it didn't work . I need to execute like this

setTimeout(function(){
    ph.createPage(function(err,page){
    });
},500);
I think 

phantom.create(function(error,ph){ });

callback executed but socket.io not prepared.