JScript is Microsoft's
legacy
Legacy or Legacies may refer to:
Arts and entertainment
Comics
* " Batman: Legacy", a 1996 Batman storyline
* '' DC Universe: Legacies'', a comic book series from DC Comics
* ''Legacy'', a 1999 quarterly series from Antarctic Press
* ''Legacy ...
dialect of the
ECMAScript
ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
standard that is used in
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
's
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
web browser and
HTML Applications, and as a standalone Windows scripting language.
JScript is implemented as an
Active Scripting engine. This means that it can be "plugged in" to
OLE Automation applications that support Active Scripting, such as
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
,
Active Server Pages, and
Windows Script Host. It also means such applications can use multiple Active Scripting languages, e.g., JScript,
VBScript or
PerlScript.
JScript was first supported in the
Internet Explorer 3.0 browser released in August 1996. Its most recent version is JScript 9.0, included in Internet Explorer 9.
JScript 10.0 is a separate dialect, also known as
JScript .NET, which adds several new features from the abandoned fourth edition of the ECMAScript standard. It must be compiled for
.NET Framework version 2 or version 4, but static type annotations are optional.
JScript has been criticized for being insecure and having multiple security bugs "exploited by nation-state actors", leading Microsoft to add an option to disable it.
Comparison to JavaScript
As explained by
Douglas Crockford
Douglas Crockford is an American computer programmer who is involved in the development of the JavaScript language. He specified the data format JSON (JavaScript Object Notation), and has developed various JavaScript related tools such as the s ...
in his talk titled ''The JavaScript Programming Language'' on YUI Theater,
However, JScript supports conditional compilation, which allows a programmer to selectively execute code within
block comments. This is an extension to the
ECMAScript
ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
standard that is unsupported in other JavaScript implementations, thus making the above statement not fully true, although conditional compilation is no longer supported in Internet Explorer 11 Standards mode.
Other internal implementation differences between JavaScript and JScript, at some point in time, are noted on the
Microsoft Developer Network (MSDN). The default type value for the script element in Internet Explorer is JavaScript, while JScript was its alias. In an apparent transition from JScript to JavaScript, online, the Microsoft Edge
egacyDeveloper Guide refers to the Mozilla MDN web reference library as its definitive documentation. As of October 2017, Microsoft MSDN pages for scripting in Internet Explorer are being redirected there as well. This information may not include JScript specific objects, such as Enumerator, which are listed in the JavaScript language reference on Microsoft Docs. Those provide additional features that are not included in the ECMA Standards, whether they are supported in the
Edge egacybrowser or its predecessor.
Versions
JScript (COM Classic)
The original JScript is an
Active Scripting engine. Like other Active Scripting languages, it is built on the
COM/OLE Automation platform and provides scripting capabilities to host applications.
This is the version used when hosting JScript inside a Web page displayed by
Internet Explorer
Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
, in an
HTML application before
IE9, as well as in
classic ASP,
Windows Script Host scripts and other
Automation
Automation describes a wide range of technologies that reduce human intervention in processes, mainly by predetermining decision criteria, subprocess relationships, and related actions, as well as embodying those predeterminations in machine ...
environments.
JScript is sometimes referred to as "classic JScript" or "Active Scripting JScript" to differentiate it from newer
.NET
The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
-based versions.
Some versions of JScript are available for multiple versions of Internet Explorer and Windows. For example, JScript 5.7 was introduced with
Internet Explorer 7
Windows Internet Explorer 7 (IE7) (codenamed Rincon) is a version of Internet Explorer, a web browser for Windows. It was released by Microsoft on October 18, 2006. It was the first major update to the browser since 2001. It does not support ve ...
.0 and is also installed for
Internet Explorer 6.0 with
Windows XP
Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct successor to Windows 2000 for high-end and business users a ...
Service Pack 3, while JScript 5.8 was introduced with
Internet Explorer 8.0 and is also installed with Internet Explorer 6.0 on
Windows Mobile 6.5.
Microsoft's implementation of ECMAScript 5th Edition in
Windows 8 Consumer Preview is called ''JavaScript'' and the corresponding
Visual Studio 11 Express Beta includes a "completely new", full-featured JavaScript editor with
IntelliSense enhancements for
HTML5
HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
and
ECMAScript 5 syntax, "VSDOC" annotations for multiple overloads, simplified
DOM configuration, brace matching, collapsible outlining and "go to definition".
JScript is also available on Windows CE (included in Windows Mobile, optional in Windows Embedded CE). The Windows CE version lacks Active Debugging.
Managed JScript
Managed JScript is an implementation of JScript for the
Dynamic Language Runtime, it is part of Microsoft's dynamic languages for .NET along with
IronRuby,
IronPython, and
Dynamic Visual Basic.
Unlike JScript .NET, which is less dynamic than the original JScript but provides
Common Language Infrastructure
The Common Language Infrastructure (CLI) is an open specification and technical standard originally developed by Microsoft and standardized by International Organization for Standardization, ISO/International Electrotechnical Commission, IEC (ISO/ ...
(CLI) compatibility, Managed JScript is designed on top of the
Dynamic Language Runtime (DLR) and provides the features needed for scripting scenarios.
While it is primarily designed to be used within
Silverlight and ASP.NET at this time, it can also easily be embedded within any .NET application.
Two builds of Managed JScript exist: one for the Desktop
Common Language Runtime (CLR) and one for the
Silverlight CoreCLR
Managed JScript is unsupported in the
.NET Compact Framework.
(Source: files versions of Microsoft.JScript.Runtime.dll in ASP.NET Futures and Silverlight 1.1 folders)
JScript "Chakra" (JsRT)
JScript "Chakra" is based on the JScript (COM classic) version, but it has been redesigned to improve performance in
Internet Explorer 9 at the expense of proper Active Scripting engine compatibility. It requires a specific Microsoft JavaScript Hosting (JsRT) API for proper use. Therefore, it is installed side by side with JScript 5.x and is only used by
Internet Explorer 9 and later as well as JsRT hosts, while other Active Scripting hosts keep using the 5.x version when requesting the JScript engine.
There are two versions of the Chakra JsRT engine.
The original one was used by
Internet Explorer 9 and later, and is sometimes referred to as "jscript9.dll" or "legacy Chakra engine", and a second one used by
Microsoft Edge Legacy
Microsoft Edge Legacy (often shortened to Edge Legacy), originally released as simply Microsoft Edge or Edge is a discontinued Proprietary Software, proprietary cross-platform software, cross-platform web browser created by Microsoft. Released ...
browser and sometimes referred to as "new Chakra engine", "Edge engine" or "Chakra.dll".
Both Chakra JsRT versions can be used by other applications using the JsRT API and can be installed side by side.
There is also a
COM Classic version of Chakra internally called "JScript 9 Legacy" (provided by jscript9Legacy.dll), introduced with Windows 11 24H2, which brings back compatibility with Active Scripting hosts and intended as a compatible drop-in replacement for JScript 5.8. Although largely compatible with the original JScript 5.8, there are notable breaking differences.
See separate page about new
Chakra (Edge) engine.
JScript .NET (CLI)
JScript .NET is a
Microsoft .NET implementation of JScript. It is a
CLI language and thus inherits very powerful features, but lacks many features of the original JScript language, making it inappropriate for many scripting scenarios.
JScript .NET can be used for
ASP.NET pages and for complete .NET applications, but the lack of support for this language in Microsoft Visual Studio places it more as an upgrade path for classic
ASP using classic JScript than as a new first-class language.
JScript .NET is unsupported in the
.NET Compact Framework.
JScript .NET versions are unrelated to classic JScript versions, and are a separate product line. Even though JScript .NET is unsupported within the Visual Studio IDE, its versions are in sync with other .NET languages versions (
C#,
VB.NET,
VC++) that follow their corresponding Visual Studio versions.
.NET Framework 3.0 and 3.5 are built on 2.0 and do not include the newer JScript.NET release (version 10.0 for .NET Framework 4.0).
(Source: file version of jsc.exe JScript.NET compiler and Microsoft.JScript.dll installed with .NET Framework)
See also
*
JScript.Encode
*
Windows Script File
*
Windows Script Host
*
WinJS
Notes
References
External links
JScript documentation in the MSDN LibraryJScript 5.7 Release NotesJScript .NET documentation in the MSDN LibraryJScript blogJScript Features – ECMAJScript Features – Non-ECMANew features in JavaScript (Microsoft Docs)
{{DEFAULTSORT:Jscript
Internet Explorer
JavaScript dialect engines
JavaScript programming language family
Microsoft programming languages
Object-based programming languages
Prototype-based programming languages
Scripting languages