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

[whatwg] Apply script.defer to internal scripts

From: Kristof Zelechovski <giecrilj@stegny.2a.pl>
Date: Fri, 30 Mar 2007 19:28:43 +0200
Message-ID: <00cb01c772f0$dd7d1c70$1a01080a@POCZTOWIEC>
Admittedly, but I still cannot see why the defer attribute must not be
specified without an external source.  What does this restriction buy you?
An opportunity to advertise DOMContentLoaded?  Using this event is much more
complicated than using the defer attribute if it were supported.

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Gareth Hay
Sent: Thursday, March 29, 2007 4:29 PM
To: Alexey Feldgendler
Cc: whatwg at whatwg.org
Subject: Re: [whatwg] Apply script.defer to internal scripts

As you carefully cut some of the quoted text, the entire context may  
not be visible.

I suggested that using onload was, as Kristof put it
> more consistent, logical, better style, whatever.

because it could be contained in the <head> of the file. the  
DOMContentLoaded property allows even better usage.
as i stated TWICE, it's my opinion, yours clearly differs, i don't  
see the need to debate coding preferences.


On 29 Mar 2007, at 13:07, Alexey Feldgendler wrote:

> On Thu, 29 Mar 2007 13:07:58 +0200, Gareth Hay <gazhay at gmail.com>  
> wrote:
>>> 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?
>> imho, doing something like this is a much better solution, again  
>> imho.
> How is this better than putting the <script> immediately beefore </ 
> body>, which already works today?
> -- 
> Alexey Feldgendler <alexey at feldgendler.ru>
> [ICQ: 115226275] http://feldgendler.livejournal.com
Received on Friday, 30 March 2007 10:28:43 UTC

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