[whatwg] Apply script.defer to internal scripts

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 
onload?
 >>
 >> Isn't that what onload is for? being triggered after the page has 
loaded?
 >
 > 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?

-Matt

Received on Thursday, 29 March 2007 03:58:13 UTC