Re: [HTML5] DOMContentLoaded fires before CSS resources loaded?

Ian Hickson wrote:
> On Wed, 22 Jul 2009, Maciej Stachowiak wrote:
>> [...] if we encounter a <script> element while a stylesheet load is 
>> pending, we block parsing until the stylesheet is loaded. We used to not 
>> do that, but it turned out to be necessary for Web compatibility.
> 
> On Wed, 22 Jul 2009, Boris Zbarsky wrote:
>> This is precisely what Gecko does [...]
> 
> Gecko and WebKit do quite different things here, actually.

In the absence of <script> elements created via DOM calls?  What are the 
differences?

> I ended up speccing the Gecko behaviour, because it is much simpler (block 
> on running any script if a style sheet is pending)

That would be running any newly-added <script>, not running script in 
general, right?  And pending has a somewhat nontrivial definition as 
well... (a stylesheet added via parsing a <link> or <style> element that 
was in the currently selected stylesheet set at the point when it was 
added to the DOM and is either not done loading or has an @import'ed 
descendant that is not done loading).

I'd really appreciate a pointer to the relevant spec section.

-Boris

Received on Monday, 3 August 2009 14:56:41 UTC