mozilla/talkilla — pull request #413 by ametaireau (2014-02-11 15:21:09+00:00)
Title: WIP - Add an event routing mechanism.

**This is a work in progress. Do not merge (yet).**

This is done in order to simplify how messages are sent and routed trough the
application.

`eventrouter.js` contains all the routing information, and the consumers should
send the messages to the router instead of the ports. Something like this::

this.router = new EventRouter("SidebarApp", this.appPort, this);
this.router.send("message");

The router object takes a reference to the routed object in order to call its
methods directly (rather than having to listen to events from within the
object).