W3C home > Mailing lists > Public > www-validator-cvs@w3.org > January 2007

[Bug 3413] If <META http-equiv="Content-Script-Type" content="text/javascript"> is set, then <SCRIPT src="foo.js"></SCRIPT> should be accepted without the "type" attribut.

From: <bugzilla@wiggum.w3.org>
Date: Thu, 04 Jan 2007 06:23:38 +0000
CC:
To: www-validator-cvs@w3.org
Message-Id: <E1H2M0o-0002Ng-Dj@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=3413





------- Comment #4 from pgaries@fastmail.us  2007-01-04 06:23 -------
> Am I wrong? Or it's a bug?

The "Content-Script-Type" only refers to the content of event attributes such
as "onmouseover", "onmouseout", "onchange", "onkeypress", et cetera, not the
"script" element. That's similar to the way "Content-Style-Type" refers to
"style" attributes, not the "style" element. In any case, the "type" attribute
is required by the DTD, so it must be present for the document to be valid.

>From the part of the specification you referred to:
"Documents that do not specify default scripting language information and that
contain elements that specify an intrinsic event script are incorrect. User
agents may still attempt to interpret incorrectly specified scripts but are not
required to."

In other words, if you use event attributes, you should specify
"Content-Script-Type" or face the (unlikely, but justified) event that a
browser will simply ignore that attribute's content because it doesn't know the
content type.
Received on Thursday, 4 January 2007 06:23:46 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:27 UTC