Re: The script language attribute

Le Sat, 08 Sep 2007 15:18:40 +0300, Anne van Kesteren <annevk@opera.com> a  
écrit:

> On Sat, 08 Sep 2007 14:09:20 +0200, Mihai Sucan <mihai.sucan@gmail.com>  
> wrote:
>> 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.
>
> Why should it be defined for the language if you want it be  
> non-conformant? Doesn't the current specification do exactly what you  
> want? It defines how user agents have to process it, but doesn't allow  
> authors to use it.

The spec only defines a very simple way to process the language attribute  
- which actually, most likely, breaks backwards-compatibility. Here's why:  
if the UAs would implement the algorithm, they will end up having things  
like:

<script language="JavaScript1.2">
<script language="Mocha">
...

Interpreted as:
<script type="text/JavaScript1.2">
<script type="text/Mocha">
...

Which is obviously wrong - no current UA implements these MIME types.

The current algorithm works only for the following, very simple case:

<script language="JavaScript">

Which is interpreted as:
<script type="text/javascript">


I suggested:

1. To explictly disallow the usage of the language attribute, in prose.  
Yes, according to the SCRIPT element definition, using the language  
attribute is non-conformant. Yet, I believe it's better to expliclty  
disallow the attribute.

2. More importantly, the algorithm needs improvements with regards to the  
parsing and usage of the language attribute.





-- 
http://www.robodesign.ro

Received on Saturday, 8 September 2007 15:57:48 UTC