I have no problem using phantom as a child process. You can communicate
with it while it is running.  I would imagine one could write a module to
make the interaction quite transparent.


On Fri, Jan 24, 2014 at 9:02 AM, // ravi <[email protected]> wrote:

> On Jan 24, 2014, at 11:30 AM, Alexey Petrushin <[email protected]>
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to