joewalker/devtools-window — pull request #95 by harthur (2012-10-26 00:10:44+00:00)
Title: Disseminate toolbox._handleEvent() into individual event handlers

We initially had a `_handleEvent()` function on the toolbox object, and it looked like it would be some kind of global event router for any event the toolbox listened for. We haven't stayed consistent with that, and also I think there could be some namespace issues, like listening for events with the same name emitted from different types of objects (e.g. "ready").

This PR takes out `handleEvent()` and breaks it up into `toolRegistered()` and `toolUnregistered()` handlers.

It also takes the offending `this._addToToolMenu(tool)` line from issue #93. With that removed, the `browser_toolbox_dynamic_registration.js` test pases.