W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

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

From: Glenn Maynard <glenn@zewt.org>
Date: Mon, 17 Jun 2013 18:52:23 -0500
Message-ID: <CABirCh9mhZBo58qRO5arTNmFCykcULE_PnkpJPbGzz+tjNUyWw@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Ian Hickson <ian@hixie.ch>, Jonas Sicking <jonas@sicking.cc>, Anne van Kesteren <annevk@annevk.nl>, "www-dom@w3.org" <www-dom@w3.org>, John Barton <johnjbarton@google.com>
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

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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:21 UTC