Re: The script element

On Mon, 3 Aug 2009, Geoffrey Sneddon wrote:
> >
> > The default, which is used if the [type] attribute is absent, is 
> > "text/javascript".
> 
> This should be "which is used if the attribute is absent or empty" to 
> match existing behaviour, and the algorithm below. (Or is this meant to 
> be part of the conformance requirements for documents? If that's the 
> case that needs to be clarified.)

This is meant to be part of the conformance requirements for documents. 
How can it be clarified (in a manner consistent with the rest of the 
spec)?


> > When examining types to determine if they support the language, user 
> > agents must not ignore unknown MIME parameters — types with unknown 
> > parameters must be assumed to be unsupported.
> 
> What about charset, which is forbidden in conforming documents? Should 
> that be treated as unknown? IE, Opera and Chromium don't run scripts 
> with charset, Firefox does (but Firefox just ignores parameters in 
> general).

Clarified.


> > The following lists some MIME types and the languages to which they refer:
> > 
> > application/ecmascript
> > application/javascript
> > application/x-ecmascript
> > application/x-javascript
> > text/ecmascript
> > text/javascript
> > text/javascript1.0
> > text/javascript1.1
> > text/javascript1.2
> > text/javascript1.3
> > text/javascript1.4
> > text/javascript1.5
> > text/jscript
> > text/livescript
> > text/x-ecmascript
> > text/x-javascript
> 
> Off that list, only IE and Chromium support text/javascript1.1, 
> text/javascript1.2, and text/javascript1.3, and nothing supports the 
> remainder of the text/javascript1.* media types (it appears Firefox and 
> Opera don't treat @language as "text/" + @language, with Firefox having 
> a separate list for @language, while Opera just ignores @language 
> completely).
> 
> As such, I don't think it's entirely useful to have that list as is, as 
> most aren't supported by multiple browsers.

It is intended to be the list that browsers end up supporting once they 
implement the spec.


On Mon, 3 Aug 2009, L. David Baron wrote:
> 
> For what it's worth, Mozilla supports the types: "text/javascript", 
> "text/ecmascript", "application/javascript", "application/ecmascript", 
> and "application/x-javascript", and supports a "version" parameter on 
> all of those types, which is in the range 1.0 to 1.8 (exact string 
> match, not numeric match), and also an "e4x" parameter taking values "0" 
> or "1" (for example, "text/javascript; version=1.7").  Which version is 
> specified turns on/off a number of language features that may be 
> backwards-incompatible.

I haven't mentioned the version parameter, because I think wherever that 
is defined should also include the list of features that it turns on and 
off. Ideally, the ECMAScript spec would do that.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 12 August 2009 22:31:18 UTC