Re: Exceptions in event listeners triggered by dispatchEvent().

On Mon, Jun 17, 2013 at 5:38 PM, John Barton <johnjbarton@google.com>wrote:

> Check-boxes are changed asynchronously (by XHR processing) all of the time.
>

That's not the asynchronicity we're talking about.  The event happens
synchronously with changing the checkbox value (and possibly changing it
back); they all happen in the same task.

On Mon, Jun 17, 2013 at 5:51 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:

> And even the usual pattern is fairly defective when you
> have more than one listener and only want to react to an event if it is
> not canceled by any of the listeners, or want to undo any side-effects
>


> if it was canceled as the case may be; only the dispatching code can do
> that properly.
>

(The event model doesn't have a direct way to add an event listener that
only runs if no other listener called preventDefault, but this seems a bit
tangental.)

-- 
Glenn Maynard

Received on Monday, 17 June 2013 23:52:50 UTC