Re: Exceptions in event listeners triggered by dispatchEvent().
"Simon Pieters" <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 05 Jun 2013 03:25:12 +0200, Glenn Maynard <[email protected]> wrote: > Note that you wouldn't want to call window.onerror directly, since you > want > "error" event listeners to be run, too. You'd dispatch an ErrorEvent, > eg. > window.dispatchEvent(new ErrorEvent("error", {"message": "message", > filename: "filename", lineno: 100})); No. window.onerror is invoked directly without an event. ErrorEvent is for the case when an uncaught error is fired on a Worker object (if the error wasn't handled in the worker itself). -- Simon Pieters Opera Software