Re: [DOM4] EventTarget.dispatchEvent() is synchronous, right?

On 9/19/11 7:02 PM, David Flanagan wrote:
> My reading of the DOM4 spec is that EventTarget.dispatchEvent() is
> completely synchronous and does not involve the event loop in any way
> and that any event handlers triggered in response to the dispatched
> event are invoked before dispatchEvent() returns to its caller.

This is correct, yes.

> The reason I ask is that browsers (at least Firefox and Chrome, and
> possibly Safari) don't seem to implement it fully synchronously

I would love to see your testcase.  To the best of my knowledge, 
dispatchEvent is completely synchronous in Gecko.


Received on Tuesday, 20 September 2011 02:18:19 UTC