ibm-js / dapp

AMD-based Application Framework for building Web & Mobile applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Work on a common strategy for listener registration.

edchat opened this issue · comments

Currently we have a mix of this.app.on, document.addEventListener and Controller.bind().

Also need to have the base Controller handle the "dapp-unload-app" event instead of having each of the controllers do it.

See if using document for all events will work, instead of use the application for some of them.

Maybe a "solution" would be for controllers to always listen on the app itself. And if some events are coming from the document or window, the app would listen to them and refire them so that Controllers can consistently listen in the app.

Would be good if that ticket was listing all the events in consideration here.