Extends the DOM CustomEvent model through to the server
npm install --save custom-event-server
server = require'custom-event-server'serveron 'beep'clientfire 'boop'serveron 'woot'consolelog 'ahhh!'serverlisten 8080
And of course you can
addEventListener, use a jQuery
on, or bind a Polymer
So the idea is that events coming from the server look and feel like events coming from other DOM elements. And, that instead of RPC/REST/Messages, you fire events on the server.
This is really just a web socket, but it adopts a (name, detail) protocol. About the only thing to keep in mind is to make sure your detail can be JSON serialized.
Fired from the server back to your client on a connection or
Fired from the client
core-custom-event-client element on a timer.
Pretty much any load balancer or proxy you put in front will time out and tear
down your web socket without this.
Fired from the server back to the client in response to a