- From: Aryeh Gregor <Simetrical+w3c@gmail.com>
- Date: Thu, 6 Aug 2009 16:52:51 -0400
On Thu, Aug 6, 2009 at 4:36 PM, Cready, James<jcready at rtcrm.com> wrote: > Is there any good reason why a <script> tag with the src attribute specified > can?t be self-closing? Because the HTML serialization should be parseable by legacy user-agents. <script src="foo" /> will be treated the same as <script src="foo"> by all existing UAs in text/html, and all subsequent content on the page will become part of the <script> tag, possibly causing the whole page to vanish (maybe less than the whole page if there's a </script> somewhere). The spec doesn't permit behavior in text/html that's incompatible with existing UAs without good reason. You can, of course, use the XHTML serialization, in which any empty element can be self-closing.
Received on Thursday, 6 August 2009 13:52:51 UTC