[whatwg] Apply script.defer to internal scripts

Matthias Bauer moeffju at moeffju.net
Thu Mar 29 03:58:13 PDT 2007

On 29.03.2007 11:33 Anne van Kesteren wrote:

 > On Thu, 29 Mar 2007 11:30:36 +0200, Gareth Hay <gazhay at gmail.com> wrote:
 >> Does it not follow that to be "more consistent, logical, better style,
 >> whatever." you should wrap your code in a function that is called 
 >> Isn't that what onload is for? being triggered after the page has 
 > That load event dispatched on the <body> element also waits for all
 > external scripts and images to be loaded. This is not always desirable.

What about the DOMContentLoaded event? It is supported by Mozilla and, 
apparently, Opera 9. Dean Edwards has a technique to make it work on IE, 
and jQuery supports it on Safari [1].

Is there any chance DOMContentLoaded will be part of HTML5?


More information about the whatwg mailing list