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

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

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 2 Aug 2009 10:04:59 +0000 (UTC)
To: Maciej Stachowiak <mjs@apple.com>, Boris Zbarsky <bzbarsky@MIT.EDU>
Cc: 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>
Message-ID: <Pine.LNX.4.62.0908020930270.6420@hixie.dreamhostps.com>
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.

I ended up speccing the Gecko behaviour, because it is much simpler (block 
on running any script if a style sheet is pending), but I did allow for a 
timeout so browsers can get on with displaying the content in case the 
style sheet is from a server that's not responding or something.

Tests:
   http://www.hixie.ch/tests/adhoc/html/script/loading/

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Sunday, 2 August 2009 10:05:42 UTC

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