JScript
   HOME

TheInfoList



OR:

JScript is Microsoft's legacy dialect of the
ECMAScript ECMAScript (; ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262 ECMAScript is commonly used for client-side scripting o ...
standard that is used in
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
's
Internet Explorer 11 Internet Explorer 11 (IE11) is the eleventh, final, and now deprecated version of the Internet Explorer web browser. It was initially included in the release of Windows 8.1, Windows RT 8.1 and Windows Server 2012 R2 on October 17, 2013, and was ...
and older. 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 IE or MSIE) is a series of graphical web browsers developed by Microsoft which was used in the Windows line of operating systems ( ...
, Active Server Pages, and
Windows Script Host The Microsoft Windows Script Host (WSH) (formerly named Windows Scripting Host) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported fe ...
. 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 Microsoft Internet Explorer 3 (IE3) is a graphical web browser which was announced in March 1996, and was released on August 13, 1996 by Microsoft for Microsoft Windows and on January 8, 1997 for Apple Mac OS (see IE for Mac). It began serious ...
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 The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
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 st ...
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 JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262 ECMAScript is commonly used for client-side scripting o ...
standard that is not supported in other JavaScript implementations, thus making the above statement not completely 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 Microsoft Developer Network (MSDN) was the division of Microsoft responsible for managing the firm's relationship with developers and testers, such as hardware developers interested in the operating system (OS), and software developers developing ...
(MSDN). Although, 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 Developer 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 browser Microsoft Edge is a Proprietary Software, proprietary, cross-platform software, cross-platform web browser created by Microsoft. It was first released in 2015 as part of Windows 10 and Xbox One and later ported to other platforms as a fork of Go ...
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 IE or MSIE) is a series of graphical web browsers developed by Microsoft which was used in the Windows line of operating systems ( ...
, in an
HTML application An HTML Application (HTA) is a Microsoft Windows program whose source code consists of HTML, Dynamic HTML, and one or more scripting languages supported by Internet Explorer, such as VBScript or JScript. The HTML is used to generate the us ...
before IE9, as well as in classic ASP,
Windows Script Host The Microsoft Windows Script Host (WSH) (formerly named Windows Scripting Host) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported fe ...
scripts and other
Automation Automation describes a wide range of technologies that reduce human intervention in processes, namely by predetermining decision criteria, subprocess relationships, and related actions, as well as embodying those predeterminations in machines ...
environments. JScript is sometimes referred to as "classic JScript" or "Active Scripting JScript" to differentiate it from newer .NET-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.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 upgrade to its predecessors, Windows 2000 for high-end and ...
Service Pack 3 In computing, a service pack comprises a collection of updates, fixes, or enhancements to a software program delivered in the form of a single installable package. Companies often release a service pack when the number of individual patches to a ...
, 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 is a markup language used for structuring and presenting content on the World Wide Web. It is the fifth and final major HTML version that is a World Wide Web Consortium (W3C) recommendation. The current specification is known as the HTML ...
and
ECMAScript 5 ECMAScript is a JavaScript standard developed by Ecma International. Since 2015, major versions have been published every June. ECMAScript 2022, the 13th and current version, was released in June 2022. Versions In June 2004, Ecma International p ...
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 CLS compatibility, Managed JScript is designed on top of the 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. (Source
JScript BlogJim Hugunin's Thinking Dynamic blog
Source
Blog of Jitu
Two builds of Managed JScript exists, one for the Desktop
CLR CLR may refer to: * Calcium Lime Rust, a household cleaning-product * California Law Review, a publication by the UC Berkeley School of Law * Tube_bending, Centerline Radius, a term in the tubing industry used to describe the radius of a bend * Cen ...
and one for the Silverlight CoreCLR Managed JScript is not supported in the
.NET Compact Framework The Microsoft .NET Compact Framework (.NET CF) is a version of the .NET Framework that is designed to run on resource constrained mobile/embedded devices such as personal digital assistants (PDAs), mobile phones, factory controllers, set-top box ...
. (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 engine, the original one used by Internet Explorer 9 and later, and sometimes referred to as "jscript9.dll" or "legacy Chakra engine", and a second one used by
Microsoft Edge Microsoft Edge is a proprietary, cross-platform web browser created by Microsoft. It was first released in 2015 as part of Windows 10 and Xbox One and later ported to other platforms as a fork of Google's Chromium open-source project: Android ...
browser and sometimes referred to as "new Chakra engine", "Edge engine" or "Chakra.dll". Both Chakra versions can be used by other applications using the JsRT API and can be installed side by side. 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 not supported in the
.NET Compact Framework The Microsoft .NET Compact Framework (.NET CF) is a version of the .NET Framework that is designed to run on resource constrained mobile/embedded devices such as personal digital assistants (PDAs), mobile phones, factory controllers, set-top box ...
. Note: JScript .NET versions are not related to classic JScript versions. JScript .NET is a separate product. Even though JScript .NET is not supported 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 top of 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 The Microsoft Windows Script Host (WSH) (formerly named Windows Scripting Host) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported fe ...
* WinJS


Notes


References


External links


JScript documentation in the MSDN Library

JScript 5.7 Release Notes

JScript .NET documentation in the MSDN Library

JScript blog



JScript Features – ECMA

JScript Features – Non-ECMA

New 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