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

Glenn Maynard <[email protected]>
Newsgroups gmane.comp.web.dom.general
Message-ID <CABirCh9mhZBo58qRO5arTNmFCykcULE_PnkpJPbGzz+tjNUyWw@mail.gmail.com>
On Mon, Jun 17, 2013 at 5:38 PM, John Barton <[email protected]>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 <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.