incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: [JS] channel.js pub/sub/unsub question
Date Thu, 31 May 2012 16:55:26 GMT
That's a compelling reason, thanks for pointing that out Bryce.

On 5/30/12 7:27 PM, "Bryce Curtis" <curtis.bryce@gmail.com> wrote:

>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 <fil@adobe.com> 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
>>


Mime
View raw message