Re: Exceptions in event listeners triggered by dispatchEvent().
Jonas Sicking <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <CA+c2ei_o2UdqM_=N_ng31cJLovA9w4NFpHkV2CqfHMq4AHKXUw@mail.gmail.com> |
I think it would be great if dispatchEvent dispatched the event at end-of-microtask or some such. Mainly to avoid reentrancy issues for web authors. And returned a Future<boolean> to indicate if default action should be run. But there is absolutely no way that that is compatible with existing content. Best we can do is to introduce a new dispatch function that works that way. / Jonas On Jun 3, 2013 10:46 AM, "Anne van Kesteren" <[email protected]> wrote: > On Mon, Jun 3, 2013 at 4:18 PM, John Barton <[email protected]> > wrote: > > The confusing is the timing. dispatchEvent() acts in some ways as if it > is > > asynchronous -- errors do not propagate -- and in other ways as if it is > -- > > the timing of the call is nested within the caller. Simply queuing the > > event for execution on the next turn would make the platform more > > consistent. > > I'm not convinced, but lets say you're correct, what's the next step? > > > -- > http://annevankesteren.nl/ > >