detecting JS language mode for tools

Brendan Eich brendan at
Sun Jan 26 17:29:06 PST 2014

David Sheets wrote:
> On Sat, Jan 25, 2014 at 11:26 PM, Brendan Eich<brendan at>  wrote:
>> >  David Sheets wrote:
>>>> >>>
>>>> >>>  . Old browsers ignore the new attribute will process the content, which
>>>>> >>>  >    could be written to work "both ways".
>>> >>
>>> >>
>>> >>  Is a new attribute necessary? What about using @type?
>> >
>> >
>> >  Old browsers will ignore unknown types, losing the two-way fallback option.
> While it is possible to write scripts that change interpretation based
> on out-of-band metadata,

There is no out-of-band metadata in a new script attribute. Attributes 
are data, not data-about-data, and in-band in HTML.

>   is it desirable to encourage? Is it worth
> creating a new attribute on the script element for what should be a
> parameter of the media type?

Who says modules *should* be a media type parameter?

> Is there a reason that feature detection and a new media type or media
> type parameter would not suffice?

I'm advocating feature detection based on a new attribute, not a new 
media type. I thought you were advocating the reverse.


More information about the es-discuss mailing list