I would say that if you subscribe multiple times with the same event handler, then it should only be called once. This is based upon what W3C DOM spec says... http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-registration
On Wed, May 30, 2012 at 4:54 PM, Filip Maj <[email protected]> wrote: > Trying to answer a question regarding our pub/sub implementation in > cordova-js. Need to fill in some tests before I pull the patch in. > > Question: if I have an event handler function, and I `subscribe` it to an > event (channel) x times, when that channel fires, should I expect it to > fire x times, or only once? > > Root issue: https://issues.apache.org/jira/browse/CB-829 > > Pull request from GH to patch: > https://github.com/apache/incubator-cordova-js/pull/14 > > Thanks for the input, > Fil >
