Re: ISSUE-36: DOMContentLoaded?

"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 UTC