On Mon, Apr 22, 2013 at 10:36 AM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 4/22/13 1:31 PM, Tab Atkins Jr. wrote:
>>> Is there a reason to not pass the success/error/upgradeneeded callbacks
>>> in a
>>> dictionary to open() in this case, so that the request object is born
>>> with
>>> the right bits and the actual reques it not kicked off until _after_ the
>>> side-effects of getting them off the dictionary have fully run to
>>> completion?
>>
>> Dunno, ask sicking.  But events do have some benefits over passed
>> callbacks.
>
> I don't understand the distinction.

Callback arguments can only be "registered" once.  Events can be
listened to multiple times.  Whether or not that distinction is useful
here can be debated, but it's a salient difference.

~TJ

Reply via email to