W3C home > Mailing lists > Public > whatwg@whatwg.org > December 2006

[whatwg] Allow trailing slash in always-empty HTML5 elements?

From: Rimantas Liubertas <rimantas@gmail.com>
Date: Fri, 1 Dec 2006 13:07:20 +0200
Message-ID: <5ccfb3340612010307x464cac8ejc4cd6da5b7345426@mail.gmail.com>
2006/12/1, Ian Hickson <ian at hixie.ch>:
> > An example of something that is NOT implemented interoperably is
> > <script src="..."/>.
> As far as I can tell, <script/> is handled by all browsers the same way as
> <script>. How is it not interoperable?

That's true, however, what happens depends on the browser and presence
of </script> in the code.

When IE encounters <script  type="text/javascript" src="somescript.js"
/> it swallows everything after as the content of script. If there is
no </script> in the source - that's it.

Firefox likes consistency: <script  type="text/javascript"
src="somescript.js" /> works OK,

This is OK too:

<script  type="text/javascript" src="somescript.js" />
<p>some text</p>
<script  type="text/javascript" src="somescript2.js" />

<script  type="text/javascript" src="somescript.js" />
<p>some text</p>
<script  type="text/javascript" src="somescript2.js"></script>

Produces only single SCRIPT in DOM tree swallowing paragraph and the
second <script>.

Opera handles the last example just fine.

Received on Friday, 1 December 2006 03:07:20 UTC

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