W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] Apply script.defer to internal scripts

From: Matthias Bauer <moeffju@moeffju.net>
Date: Thu, 29 Mar 2007 12:58:13 +0200
Message-ID: <460B9BC5.2080802@moeffju.net>
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?

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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:54 UTC