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: Fri, 7 Jun 2013 08:40:09 -0500
Message-ID: <CABirCh-TkdO=XEk+ho7OrUrNW5A8kiEt1q72xNmQxgr+W7Mc0Q@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: Domenic Denicola <domenic@domenicdenicola.com>, John Barton <johnjbarton@google.com>, johnjbarton <johnjbarton@chromium.org>, "www-dom@w3.org" <www-dom@w3.org>, Anne van Kesteren <annevk@annevk.nl>
On Fri, Jun 7, 2013 at 8:09 AM, Simon Pieters <simonp@opera.com> wrote:

> Well then those browsers violate the spec and the original
> implementation... At least Presto implements the spec.

When IE, Chrome and Firefox all violate the spec in the same way, it's the
spec that's wrong.  You know that.

>  (The spec looks incorrect here.  It bypasses event dispatch entirely and
>> calls "onerror" directly, which forgets to fire event listeners.  It also
>> doesn't make much sense to support error handling with event listeners in
>> workers but not in the UI thread.  This should probably just fire an
>> ErrorEvent, and the window.onerror special case should probably be in the
>> event dispatch algorithm.)
> You misunderstood the worker case. Errors in workers are handled the same
> as in window, i.e. onerror is invoked directly. However, if a worker error
> is not "handled", an ErrorEvent gets fired on the Worker object.

Sorry, I don't follow and I don't believe I'm misunderstanding anything.
The above describes the *non*-worker behavior.

Glenn Maynard
Received on Friday, 7 June 2013 13:40:38 UTC

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