Fwd: "delay" keyword

Boris Zbarsky bzbarsky at mozilla.com
Thu Jul 5 20:05:49 PDT 2012

On 7/5/12 1:50 PM, Brendan Eich wrote:
> Seems like a bug in Firefox, a violation of HTML5 even. The slow script
> dialog should not allow an event loop to nest. Cc'ing Boris for his
> opinion (this may be a known bug on file, my memory dims with age).

It's a violation of HTML5, but so, technically, is the entire Firefox 
event loop.  HTML5 specifies a very specific set of event queues, and 
implementing pretty much anything other than exactly that is likely to 
lead to page-visible spec bugs.  Of course the slow script dialog itself 
is technically a spec violation.....

In any case, I believe we are in the process of moving to a more 
HTML5-like setup here (with multiple per-page event queues, etc), which 
should more or less fix most of these issues: we'd just disable all of a 
page's event queues when the slow script dialog comes up.

Note that I say "most".  There are some fundamental problems here.  Say 
the user decides to close the tab or window when they get the slow 
script prompt (something that I think is desirable to allow the user to 
do, personally).  Should this close the tab/window without firing unload 
events (a spec violation) or should it fire them while other script from 
the page is on the stack and at some random point in its execution (hey, 
another spec violation)?


More information about the es-discuss mailing list