On Jan 24, 2014, at 11:30 AM, Alexey Petrushin <alexey.petrus...@gmail.com> wrote: > > PhantomJS ... > > But does it works with node.js? I heard it needs to maintain its own control > over the loop. >
IIUC it does not integrate with NodeJS for the reason you mention: control over the loop. Here’s the section from the FAQ: http://phantomjs.org/faq.html > Q: Why is PhantomJS not written as Node.js module? > > A: The short answer: "No one can serve two masters." > > A longer explanation is as follows. > > As of now, it is technically very challenging to do so. > > Every Node.js module is essentially "a slave" to the core of Node.js, i.e. > "the master". In its current state, PhantomJS (and its included WebKit) needs > to have the full control (in a synchronous matter) over everything: event > loop, network stack, and JavaScript execution. > > If the intention is just about using PhantomJS right from a script running > within Node.js, such a "loose binding" can be achieved by launching a > PhantomJS process and interact with it. —ravi -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.