A brief example of the latest idea for communicating with PhantomJS from the client-side.
This is the next revision of ideas discussed in a previous Gist:
https://gist.github.com/JamesMGreene/3716654
This example demonstrates shimming in the new communication channels under discussion via existing methods (WebPage#onCallback
and window.callPhantom
).
The example does, however, take advantage of a yet-to-be-implemented EventEmitter API for core modules in the PhantomJS outer context. This API would add the following methods to core modules as appropriate:
on
/addEventListener