W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 25 Mar 2009 10:56:11 -0400
Message-ID: <49CA460B.5090202@mit.edu>
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
Received on Wednesday, 25 March 2009 07:56:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT