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

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" <annevk@annevk.nl> wrote:

> On Mon, Jun 3, 2013 at 4:18 PM, John Barton <johnjbarton@google.com>
> 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/
>
>

Received on Monday, 3 June 2013 18:33:00 UTC