W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

Re: ISSUE-36: DOMContentLoaded?

From: Jim Ley <jim@jibbering.com>
Date: Fri, 10 Mar 2006 21:58:42 -0000
Message-ID: <002201c6448d$cc53cf80$2502a8c0@Snufkin>
To: "Web APIs WG \(public\)" <public-webapi@w3.org>

"Jonas Sicking" <jonas@sicking.cc>
> There is always going to be a risk that resources, including scripts and 
> images, are loaded when DOMContentLoaded fires. If the UA a script in 
> cache it might execute the script right away even if it has the defer 
> attribute. And if an image lives in cache it could be inserted in the page 
> layout right away.
>
> Is that a problem?

That's not a problem _at all_  the problem is the reverse that requiring 
scripts to load (as opposed to stylesheets or images or other included 
content) means that DOMContentLoaded fails to meet the use case of being 
used for attaching behaviour before the content is rendered and available to 
the user to interact with.  So the event really should be defined to fire as 
soon as the last element is available for scripting.

(I'm still not confident DOMContentLoaded is a useful event, but we should 
probably define it)

Cheers,

Jim. 
Received on Friday, 10 March 2006 22:00:21 GMT

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