W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Should / Can an EventHandler throw a stack overflow exception?

From: Yutaka Hirano <yhirano@google.com>
Date: Mon, 30 Jun 2014 17:27:54 +0900
Message-ID: <CABihn6HrB2eBYO6gMXupTcJn4U01myE_01zSQxSyfoN0-21WLw@mail.gmail.com>
To: public-webapps@w3.org
Hi,

I found that Chrome, Safari and Firefox report stack overflow exception
thrown from an EventHandler differently.
The spec[1] says that:

Exceptions thrown inside event listeners must not stop the propagation
of the event or affect the propagation path. The exception itself must
not propagate outside the scope of the event handler.

But it is unclear to me whether a stack overflow exception is counted
as an exception thrown inside an event listener.
I used the attached HTML (you need an HTTP server and /hello.txt to use it)
to investigate browser behaviors.

Chrome 35: Throws an exception
Safari 7.0.4, Firefox 30: Doesn't throw an exception

Can anyone tell me which is correct?

Thanks,

1: http://www.w3.org/TR/DOM-Level-3-Events/#event-flow

Received on Monday, 30 June 2014 08:30:16 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:25 UTC