Script Languages in Internet Explorer

The <script> tag in an HTML document introduces text that the browser is, in general, to interpret as program code. The programming language is determined by MSHTML.DLL, typically from attributes in the tag. The names of two languages are built in. Others are recognised only if supported in the registry. Even though a language is recognised, configuration in the registry is required so that MSHTML knows which DLL has the work of interpreting the script.

Specification of Language in Tag

The script language is governed by two attributes: language is obvious and natural, but type actually has precedence.

Attribute Value Language
type text/language language
language LiveScript JavaScript
language language

The attribute value and the name of the language are case-insensitive. With no language specified in the tag, MSHTML chooses from whatever language is already applicable, e.g., from an earlier script block, else defaults to JavaScript.

Valid Languages

As far as concerns MSHTML, the names jscript and javascript are indistinguishable as aliases for JScript, which is “the Microsoft implementation of the ECMA 262 language specification”. Similarly, vbs and vbscript are aliases for VBScript, which is Microsoft Visual Basic Scripting Edition.

For every language, there is a CLSID. The correspondence is established through the registry, in general, but is built-in for JScript and VBScript.

Language CLSID
jscript
javascript
{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}
vbs
vbscript
{B54F3741-5B07-11CF-A4B0-00AA004A55E8}
language default value of HKEY_CLASSES_ROOT\language\CLSID
provided that HKEY_CLASSES_ROOT\CLSID\clsid\Implemented Categories\{F0B7A1A2-9847-11CF-8F20-00805F2CD064} exists

Thus, in the general case, the language’s name is treated as a ProgID for conversion to a CLSID, which must then list CATID_ActiveScriptParse among its implemented categories.

Typical Configuration

For a typical configuration of Internet Explorer 7.0 on Windows Vista, the following names are supported for the language in a <script> tag.

Language CLSID Implementation
XML {989D1DC0-B162-11D1-B6EC-D27DdCF9A923} msxml3.dll
VBS
VBScript
{B54F3741-5B07-11CF-A4B0-00AA004A55E8} vbscript.dll
VBScript.Encode {B54F3743-5B07-11CF-A4B0-00AA004A55E8} vbscript.dll
JScript.Compact {CC5BBEC3-DB4A-4BED-828D-08D78EE3E1ED} jscript.dll
ECMAScript
JavaScript
JavaScript1.1
JavaScript1.2
JavaScript1.3
JScript
LiveScript
{F414C260-6AC0-11CF-B6D1-00AA00BBBB58} jscript.dll
JScript.Encode {F414C262-6AC0-11CF-B6D1-00AA00BBBB58} jscript.dll