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)


Received on Friday, 10 March 2006 22:00:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC