W3C home > Mailing lists > Public > public-webapi@w3.org > July 2007

Re: DOMContentLoaded

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 08 Jul 2007 21:12:14 -0500
Message-ID: <4691997E.3070807@mit.edu>
To: Nicolas Mendoza <mendoza@pvv.ntnu.no>
CC: Ian Hickson <ian@hixie.ch>, public-webapi@w3.org

Nicolas Mendoza wrote:
> Specifically, with Mozilla Firefox, CSS style attributes from external 
> stylesheets are applied to the DOM tree before DOMContentLoaded is 
> fired.

In Mozilla DOMContentLoaded is fired when the end of the document is parsed (the 
</html> in HTML documents).

Depending on timing of network events, stylesheets may or may not have loaded 
before then.

Note that released Gecko builds block the parser on stylesheets just like they 
do for scripts.  Thus DOMContentLoaded always fires after stylesheets have 
loaded in release Geckos.  That's not going to be the case in Gecko 1.9.

> In Opera it's fired when the tree is done and styles are applied 
> later.

I find it hard to believe that this is true in all cases, because this would 
imply that Opera doesn't do incremental rendering.  My experience is that it does.

-Boris
Received on Monday, 9 July 2007 02:12:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:57 GMT