W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 19 Sep 2011 22:17:49 -0400
Message-ID: <4E77F7CD.7020009@mit.edu>
To: www-dom@w3.org
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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:18 UTC