W3C home > Mailing lists > Public > public-html@w3.org > September 2007

The script language attribute

From: Mihai Sucan <mihai.sucan@gmail.com>
Date: Sat, 08 Sep 2007 15:09:20 +0300
To: public-html <public-html@w3.org>
Message-ID: <op.tyb31ul9mcpsjgr0b0dp@athlon>

Hello!

While reviewing the 3.17. Scripting section [1] of the HTML 5  
specification, the "language" attribute got my attention.


1. The algorithm for running a script includes the usage of the "language"  
attribute. This attribute is, however, left undefined. The spec should  
"define" the attribute as a legacy attribute and non-conformant.


2. The algorithm for running a script says that the value of the  
"language" attribute is prefixed with "text/", and that the resulting  
string is the MIME type of the given script. However, I believe that's not  
a complete interpretation of the "language" attribute. It's known there  
are documents which use values such as "JavaScript", "Javascript",  
"JavaScript 1.2", "JScript", "javascript1.5", etc.

The value is generally a mess.


Two possible solutions:

a) The spec defines some "algorithm" in regards to the language attribute  
value. Something like:

"The language attribute value must be lower cased. If the value starts  
with 'jscript' or 'javascript', then set a new attribute value  
'javascript'. The script MIME type is the concatenation of the 'text/'  
string with the language attribute value."

That's probably still too simple, or maybe it works well enough, given  
current implementations. I don't think current major UAs really "care"  
what's the value of the language attribute.


b) Mention that the language attribute value may require additional  
parsing for legacy content, giving some examples "Javascript1.2",  
"javascript 1.5", being all simply interpreted as "javascript".





[1]  
http://www.whatwg.org/specs/web-apps/current-work/multipage/section-scripting0.html



-- 
http://www.robodesign.ro
Received on Saturday, 8 September 2007 12:09:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:49 UTC