[whatwg] HTML 5 Script Tag

Aryeh Gregor Simetrical+w3c at gmail.com
Fri Aug 14 15:16:30 PDT 2009


On Fri, Aug 14, 2009 at 11:48 AM, Cready, James<jcready at rtcrm.com> wrote:
> Except of course for the following: <area> <base> <br> <col> <command>
> <embed> <hr> <input> <img> <link> <meta> <param> and <source>
>
> And these "obsolete elements" still supported by legacy UAs: <basefont>
> <bgsound> and <wbr>

Those are just unclosed, they're not self-closing.  If you use the
"/>" syntax it's not closing the tag, it's just ignored.  If this
proposal were accepted, <script> would become the only tag in
text/html where "<foo />" is treated any differently from "<foo>".

> <article> == <section> == <div>
> <aside> == <details> == <figure>
>
> <i> == <em>
> <b> == <strong>
> <span> == <mark>
>
> <caption> == <legend> (if it was allowed inside <table>)

Those are not redundant.  Each of the features you mention serves a
different purpose from the one(s) you equate it to, and is defined to
have different semantics.  The proposal that Ian was responding to is
to create a new <link rel=script href=foo> construct that would be
defined to be *identical* to <script src=foo></script>, or <style
src=foo></style> defined to be *identical* to <link rel=stylesheet
href=foo>.

> It already works this way. The browser ignores everything inside the
> <script> tag the moment you put these three letters inside the brackets:
> "src"

It does not work as desired.  Browsers currently parse any content
from the opening <script> up to the next </script> as being inside the
<script> element (and do nothing with it except stick it in the DOM).
The desired behavior is that the browser close the tag immediately and
treat any subsequent content as being outside the <script>.



More information about the whatwg mailing list