W3C home > Mailing lists > Public > public-html@w3.org > August 2009

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 03 Aug 2009 10:54:33 -0400
Message-ID: <4A76FA29.3060000@mit.edu>
To: Ian Hickson <ian@hixie.ch>
CC: Maciej Stachowiak <mjs@apple.com>, Travis Leithead <travil@microsoft.com>, "public-html@w3.org" <public-html@w3.org>, Jacob Rossi <t-jacobr@microsoft.com>, Kirk Sykora <ksykora@microsoft.com>, Harley Rosnow <Harley.Rosnow@microsoft.com>
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 

> 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.

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

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:53 UTC