[whatwg] Link.onload; defer on style, depends

Boris Zbarsky bzbarsky at MIT.EDU
Wed Mar 25 07:56:11 PDT 2009


Boris Zbarsky wrote:
>>> No.  What's paused is execution of new scripts, not of existing ones. 
>>> So in
>>> this case, b() executes immediately, while a() executes after the 
>>> stylesheet
>>> loads.
>>
>> Woah, so this can affect the order of script execution?
> 
> Yes, just like document.write(<script src=...>) would, no?

And just to be clear, since in Gecko 1.8.1 and earlier <link 
rel="stylesheet"> blocked the parser, it behaved just like <script 
src="..."> there.  So the order of script execution in your testcase was 
affected in those builds as well.

-Boris



More information about the whatwg mailing list