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

[whatwg] Apply script.defer to internal scripts

From: Kristof Zelechovski <giecrilj@stegny.2a.pl>
Date: Tue, 3 Apr 2007 16:07:04 +0200
Message-ID: <007e01c775f9$5bad77b0$1a01080a@POCZTOWIEC>
The semantic of the DEFER attribute is already specified.  You may complain
about it of course but it has nothing to do with my suggestion.  I only
think it should apply to embedded scripts as well, which is IMHO completely
independent of the semantic.  Browser incompatibilities are not an issue in
a restricted environment where I can impose requirements on the browsers
supported; I just do not want the validator to complain about my DEFER.  You
can have it one way or the other - but do not make it harder than it needs
to be, which means the current prerequisite SRC for DEFER should be

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Hallvord R M Steen
Sent: Tuesday, April 03, 2007 3:48 PM
To: Kristof Zelechovski
Cc: whatwg at whatwg.org
Subject: Re: [whatwg] Apply script.defer to internal scripts

On 27/03/07, Kristof Zelechovski <giecrilj at stegny.2a.pl> wrote:

> 3.17.1. The script element specification says:
> defer (if the src attribute is present)
> async (if the src attribute is present)
> I understand that the async attribute must depend on the src attribute
> because it is needed and meaningful only when the script element is loaded
> from an external source; however, the advantage of using the defer
> is not limited to that case.

There is no real advantage to the defer attribute since in HTML4 it is
only advisory, the UA is not required to actually defer the script
execution, and some implementations only defer it until seeing the
next SCRIPT element in the source. Relying on it the way your use case
does will work in very few browsers, and specifying this in HTML5
would increase backwards incompatibility for a very minimal gain.

Hallvord R. M. Steen
Received on Tuesday, 3 April 2007 07:07:04 UTC

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