W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2009

[whatwg] HTML 5 Script Tag

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Thu, 6 Aug 2009 17:04:42 -0400
Message-ID: <7c2a12e20908061404m6eded24fo632cbc243ac33f02@mail.gmail.com>
On Thu, Aug 6, 2009 at 4:56 PM, Greg Houston<gregory.houston at gmail.com> wrote:
> This makes sense to me as well. Last week a user of my framework
> posted to the forums asking for help. The JavaScript was not loading,
> and it turned out he was trying to self-close the script tags in the
> header. So for at least some percentage of people the intuited
> expectation is that the script tag can be self-closing like the link
> tag.

This is a problem caused by the use of fake XHTML.  People have been
taught for years now that they should do <link ..... /> even though
it's precisely identical to <link .....> in text/html as far as UAs
actually implement it.  It makes people think there's a difference,
and they expect the difference to make sense.  It doesn't.

The fix is to avoid using or teaching the self-closing syntax in
text/html: just use <link .....> and omit the trailing slash.  This
will work in all UAs and isn't misleading.  Trying to get UAs to
support self-closing syntax on more elements will cause *more*
confusion in the short term, not less, because people will see that it
*does* work in Firefox 3.7 or whatever and assume it works in Firefox
3.5, which it doesn't.
Received on Thursday, 6 August 2009 14:04:42 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:15 UTC