W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: Proposal for mousewheel events

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 10 Apr 2006 15:46:01 -0500
Message-ID: <443AC409.10508@mit.edu>
To: Sjoerd Visscher <sjoerd@w3future.com>
CC: public-webapi@w3.org

Sjoerd Visscher wrote:
> No, a synchronous XMLHttpRequest does not block the running javascript 
> thread.

I'm not sure what you mean by that, actually.   It block execution of the script 
in which the call was made.

> But it will therefore also not block the onclick handler

It'll block it in Gecko.

> and you'll still see no black background flash.

Did you test this?

> The onclick and onmouseup events run in the same thread. Only when this thread is done, you'll see 
> a redraw. The onreadystate event will start a new thread to finish 
> handling the XMLHttpRequest.

There's no new thread started in Gecko.

> Firefox and IE do not redraw as long as the javascript code is running.

Actually, that's not true; there are ways to force a redraw while JS is running 
(eg setting the value of a form input will often do it).

> So what I mean with forbidding a redraw is that the 2 events run in the 
> same javascript thread.

All JS in Gecko, as far as this discussion is concerned, runs on a single 
thread.  All events fire on that thread.  All painting happens on that thread. 
There is only one thread in the application as far as page code is concerned.

Received on Monday, 10 April 2006 20:46:22 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC