An event emitter between the browser and node side of PhantomJS