JScript is Microsoft's
legacy
In law, a legacy is something held and transferred to someone as their inheritance, as by will and testament. Personal effects, family property, marriage property or collective property gained by will of real property.
Legacy or legacies may refer ...
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, Washing ...
'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
Active Scripting (formerly known as ActiveX Scripting) is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation (part of COM) and allows installation of additional scripting engines in the form ...
engine. This means that it can be "plugged in" to
OLE Automation
In Microsoft Windows applications programming, OLE Automation (later renamed to simply Automation) is an inter-process communication mechanism created by Microsoft. It is based on a subset of Component Object Model (COM) that was intended for use ...
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 user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
,
Active Server Pages
Active Server Pages (ASP) is Microsoft's first server-side scripting language and engine for dynamic web pages.
It was first released in December 1996, before being superseded in January 2002 by ASP.NET.
History
Initially released as an add ...
, 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
VBScript (''"Microsoft Visual Basic Scripting Edition"'') is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers w ...
or
PerlScript
ActivePerl is a distribution of Perl from ActiveState (formerly part of Sophos) for Windows, macOS, Linux, Solaris, AIX and HP-UX.
A few main editions are available, including: Community (free, for development use only), and several paid tiers up ...
.
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 ...
in his talk titled ''The JavaScript Programming Language'' on
YUI Theater Yui may refer to:
People
*Yui (name), a Japanese name
* Yui (singer) (born 1987), Japanese singer-songwriter, multi-instrumentalist, and actress
*Yui people or Ibi, a Timucuan-speaking people in what now is Georgia, United States
Places
*Yui, Shiz ...
,
However, JScript supports
conditional compilation
In computer programming, conditional compilation is a compilation technique which results in an executable program that is able to be altered by changing specified parameters. This technique is commonly used when these alterations to the program a ...
, which allows a programmer to selectively execute code within
block comments
This comparison of programming languages compares the features of language syntax (format) for over 50 computer programming languages.
Expressions
Programming language expressions can be broadly classified into four syntax structures:
;pre ...
. 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, 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 ...
or its predecessor.
Versions
JScript (COM Classic)
The original JScript is an
Active Scripting
Active Scripting (formerly known as ActiveX Scripting) is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation (part of COM) and allows installation of additional scripting engines in the form ...
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 user interface, graphical web browsers developed by Microsoft which was used in the Microsoft Wind ...
, 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 user i ...
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
Windows Mobile 6.5 was a stopgap update to Windows Mobile 6.1 intended to bridge the gap between version 6.1, that arrived in 2008, and Windows Phone 7 that was released in 2010.
It was never part of Microsoft's original mobile phone roadmap, ...
.
Microsoft's implementation of ECMAScript 5th Edition in
Windows 8 Consumer Preview is called ''JavaScript'' and the corresponding
Visual Studio
Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs including web site, websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platfor ...
11 Express Beta includes a "completely new", full-featured JavaScript editor with
IntelliSense
Intelligent code completion is a context-aware code completion feature in some programming environments that speeds up the process of coding applications by reducing typos and other common mistakes. Attempts at this are usually done through auto-c ...
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 Dom or DOM may refer to:
People and fictional characters
* Dom (given name), including fictional characters
* Dom (surname)
* Dom La Nena (born 1989), stage name of Brazilian-born cellist, singer and songwriter Dominique Pinto
* Dom people, an et ...
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
The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime (CLR) and provides computer language services for dynamic languages. These services include:
* A dynamic type system, to be shared by all languages using ...
, it is part of Microsoft's dynamic languages for .NET along with
IronRuby
IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET Framework. It is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynamic ...
,
IronPython
IronPython is an implementation of the Python programming language targeting the .NET Framework and Mono. Jim Hugunin created the project and actively contributed to it up until Version 1.0 which was released on September 5, 2006. IronPython 2.0 ...
, 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
Microsoft Silverlight is a discontinued application framework designed for writing and running rich web applications, similar to Adobe Inc., Adobe's Run time environment, runtime, Adobe Flash. A plugin for Silverlight is still available for a v ...
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
Internet Explorer 9 or IE9 (officially Windows Internet Explorer 9) is a web browser for Windows. It was released by Microsoft on March 14, 2011, as the ninth version of Internet Explorer and the successor to Internet Explorer 8, and can replace p ...
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
Internet Explorer 9 or IE9 (officially Windows Internet Explorer 9) is a web browser for Windows. It was released by Microsoft on March 14, 2011, as the ninth version of Internet Explorer and the successor to Internet Explorer 8, and can replace p ...
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
Internet Explorer 9 or IE9 (officially Windows Internet Explorer 9) is a web browser for Windows. It was released by Microsoft on March 14, 2011, as the ninth version of Internet Explorer and the successor to Internet Explorer 8, and can replace p ...
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
The Microsoft .NET strategy is a marketing plan that Microsoft followed in the early 2000s. Steve Ballmer described it as the company's "most ambitious undertaking since Internet Strategy Day in 1995". In support of this strategy, between 2000 and ...
implementation of JScript. It is a
CLI CLI may refer to:
Computing
* Call Level Interface, an SQL database management API
* Command-line interface, of a computer program
* Command-line interpreter or command language interpreter; see List of command-line interpreters
* CLI (x86 instruc ...
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
ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name s ...
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
Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visua ...
,
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
A Windows Script File (WSF) is a file type used by the Microsoft Windows Script Host. It allows mixing the scripting languages JScript and VBScript within a single file, or other scripting languages such as Perl, Object REXX, Python, or Kixtart if ...
*
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
The Windows Library for JavaScript (abbreviated as WinJS) is an open-source JavaScript library developed by Microsoft. It has been designed with the primary goal of easing development of Windows Store apps for Windows 8 and Windows 10, as well as ...
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