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

Re: ISSUE-36: DOMContentLoaded?

From: ROBO Design <robodesign@gmail.com>
Date: Mon, 06 Mar 2006 14:06:18 +0200
To: "Jonas Sicking" <jonas@sicking.cc>
Cc: "Web API WG" <public-webapi@w3.org>
Message-ID: <op.s5zqkss3mapogm@localhost.localdomain>

Le Mon, 06 Mar 2006 11:38:52 +0200, Jonas Sicking <jonas@sicking.cc> a  

>>  I don't think we should say that all scropts have to be loaded since a  
>> proper implementation of the defer attribute could build the DOM before  
>> loading all scripts.
> The more I think about it the more I think it might be a good idea to  
> require all scripts to be loaded. Without that we might be severly  
> reducing the usefulness of the event by forcing too many users to wait  
> for "load" to fire in order to reliably use functions and global  
> variables provided in scripts.
> There might also be issues with current implementations would load all  
> scripts before firing the event, so users might become dependent on it  
> anyway.
> / Jonas

This is an interesting problem, and no matter what behaviour will be  
picked some web devs still won't be happy.

The safest way would be to fire the event when all scripts have been  
loaded, because if no JS has been loaded, but the content was loaded and  
parsed into the DOM... then that's useless - there's no JS to catch the  
event. The other case, as you said, is ... a script might catch the event  
but some functions and global variables can be missing and thus break the  

In this case DOMContentLoaded is not an appropriate event name.  
DOMScriptsLoaded perhaps.

ROBO Design - We bring you the future
Received on Monday, 6 March 2006 12:05:25 UTC

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