On 4/22/13 1:41 PM, Tab Atkins Jr. wrote:
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.

What I meant is that I don't understand the distinction between the two in this particular case, when I am proposing that the callback arguments be registered as event listeners by the call. I understand the general difference between the two, thanks. ;)

This does mean that if you have more than one success listener you lose, of course....

-Boris

Reply via email to