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

[whatwg] Apply script.defer to internal scripts

From: Gareth Hay <gazhay@gmail.com>
Date: Thu, 29 Mar 2007 12:07:58 +0100
Message-ID: <6C8CAFD5-E5C5-4190-8DD9-E6A7587CB2AE@gmail.com>
+1

imho, doing something like this is a much better solution, again imho.

On 29 Mar 2007, at 11:58, Matthias Bauer wrote:

> 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 04:07:58 UTC

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