Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

JScript

From Wikipedia, the free encyclopedia
Implementation of ECMAScript by Microsoft
Not to be confused withJavaScript.
JScript
ParadigmsMulti-paradigm:object-oriented (prototype-based),functional,imperative,scripting
FamilyECMAScript
DeveloperMicrosoft
First appeared1996; 30 years ago (1996)
Final release
9.0 / March 2011; 14 years ago (2011-03)
Typing disciplinedynamic,weak,duck
Scopelexical
OSMicrosoft Windows
Licenseproprietary
Filename extensions.js,.jse,.wsf,.wsc (.htm,.html,.hta,.asp)[1]
Websitelearn.microsoft.com/en-us/previous-versions/hbxc2t98(v=vs.85)
Majorimplementations
Active Scripting,JScript .NET
Influenced by
JavaScript

JScript is Microsoft'slegacy[2] dialect of theECMAScript standard[3] that is used inMicrosoft'sInternet Explorer web browser andHTML Applications, and as a standalone Windows scripting language. It isproprietary software.

JScript is implemented as anActive Scripting engine. This means that it can be "plugged in" toOLE Automation applications that support Active Scripting, such asInternet Explorer,Active Server Pages, andWindows Script Host.[4] It also means such applications can use multiple Active Scripting languages, e.g., JScript,VBScript orPerlScript.

JScript was first supported in theInternet Explorer 3.0 browser released in August 1996. Its most recent version is JScript 9.0, included in Internet Explorer 9.

JScript 10.0[5] is a separate dialect, also known asJScript .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",[6] leading Microsoft to add an option to disable it.[7]

Comparison to JavaScript

[edit]

As explained byDouglas Crockford in his talk titledThe JavaScript Programming Language on YUI Theater,

[Microsoft] did not want to deal withSun Microsystems about the trademark issue, and so they called their implementation JScript. A lot of people think that JScript and JavaScript are different but similar languages. That's not the case. They are just different names for the same language, and the reason the names are different was to get around trademark issues.[8]

However, JScript supports conditional compilation, which allows a programmer to selectively execute code withinblock comments. This is an extension to theECMAScript 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 theMicrosoft Developer Network (MSDN).[9] The default type value for the script element in Internet Explorer is JavaScript, while JScript was its alias.[10] In an apparent transition from JScript to JavaScript, online, the Microsoft Edge [Legacy] Developer Guide refers to the Mozilla MDN web reference library as its definitive documentation.[11] As of October 2017, Microsoft MSDN pages for scripting in Internet Explorer are being redirected there as well.[12] This information may not include JScript specific objects, such as Enumerator, which are listed in the JavaScript language reference on Microsoft Docs.[13] Those provide additional features that are not included in the ECMA Standards, whether they are supported in theEdge [Legacy] browser or its predecessor.[14]

Versions

[edit]

JScript (COM Classic)

[edit]

The original JScript is anActive Scripting engine. Like other Active Scripting languages, it is built on theCOM/OLE Automation platform and provides scripting capabilities to host applications.

This is the version used when hosting JScript inside a Web page displayed byInternet Explorer, in anHTML application beforeIE9, as well as inclassic ASP,Windows Script Host scripts and otherAutomation 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 withInternet Explorer 7.0 and is also installed forInternet Explorer 6.0 withWindows XPService Pack 3, while JScript 5.8 was introduced withInternet Explorer 8.0 and is also installed with Internet Explorer 6.0 onWindows Mobile 6.5.

Microsoft's implementation of ECMAScript 5th Edition inWindows 8 Consumer Preview is calledJavaScript and the correspondingVisual Studio 11 Express Beta includes a "completely new", full-featured JavaScript editor withIntelliSense enhancements forHTML5 andECMAScript 5 syntax, "VSDOC" annotations for multiple overloads, simplifiedDOM configuration, brace matching, collapsible outlining and "go to definition".[15]

VersionDateIntroduced with[16]Based on[note 1]SimilarJavaScript version
1.0Aug 1996Internet Explorer 3.0Netscape JavaScript1.0
2.0Jan 1997Windows IIS 3.0Netscape JavaScript1.1
3.0Oct 1997Internet Explorer 4.0ECMA-262 1st edition[note 2]1.3
4.0Visual Studio 6.0 (as part ofVisual InterDev)ECMA-262 1st edition1.3
5.0Mar 1999Internet Explorer 5.0ECMA-262 2nd edition1.4
5.1Internet Explorer 5.01ECMA-262 2nd edition1.4
5.5Jul 2000Internet Explorer 5.5 &Windows CE 4.2ECMA-262 3rd edition1.5
5.6Oct 2001Internet Explorer 6.0 &Windows CE 5.0ECMA-262 3rd edition1.5
5.7Nov 2006Internet Explorer 7.0ECMA-262 3rd edition[19] + ECMA-327 (ES-CP)[note 3]1.5
5.8Mar 2009Internet Explorer 8.0 &Internet Explorer Mobile 6.0ECMA-262 3rd edition + ECMA-327 (ES-CP)[note 3] +JSON (RFC 4627)1.5
11.0Jun 2024Windows 11 version 24H2(JScript 9 Legacy, designed as a compatible drop-in replacement for JScript 5.8, but not 100% compatible[20])1.5

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

[edit]

Managed JScript is an implementation of JScript for theDynamic Language Runtime, it is part of Microsoft's dynamic languages for .NET along withIronRuby,IronPython, andDynamic Visual Basic.Unlike JScript .NET, which is less dynamic than the original JScript but providesCommon Language Infrastructure (CLI) compatibility, Managed JScript is designed on top of theDynamic Language Runtime (DLR) and provides the features needed for scripting scenarios.

While it is primarily designed to be used withinSilverlight and ASP.NET at this time, it can also easily be embedded within any .NET application.[21]

Two builds of Managed JScript exist: one for the DesktopCommon Language Runtime (CLR) and one for theSilverlight CoreCLR

VersionDateIntroduced withBased onPlatform
1.0.0.02007ASP.NET Futures (July 2007 preview)ECMA-262 3rd editionDesktopCLR 2.0
1.1.20625.02007Microsoft Silverlight 1.1 Alpha (Sep 2007 refresh)ECMA-262 3rd editionCoreCLR 1.1

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)

[edit]
See also:Chakra (JScript engine)

JScript "Chakra" is based on the JScript (COM classic) version, but it has been redesigned to improve performance inInternet Explorer 9[22] 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 byInternet 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.

VersionDateIntroduced with[23]Based on[24]SimilarJavaScript version
Chakra 9.0Mar 2011Internet Explorer 9.0ECMA-262 5th edition1.8.1
Chakra 10.0Sep 2012Internet Explorer 10.0ECMA-262 5.1 edition
Chakra 11.0Oct 2013Internet Explorer 11.0ECMA-262 6th edition
Chakra EdgeJul 2015Edge [Legacy] /Windows 10ECMA-262 5.1 to 9 (2018) edition

(kept up to date without engine versioning)

There are two versions of the Chakra JsRT engine.The original one was used byInternet Explorer 9 and later, and is sometimes referred to as "jscript9.dll" or "legacy Chakra engine", and a second one used byMicrosoft Edge Legacy 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.[25]

There is also aCOM 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.[26]

See separate page about newChakra (Edge) engine.

JScript .NET (CLI)

[edit]
Main article:JScript .NET

JScript .NET is aMicrosoft .NET implementation of JScript. It is aCLI 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 forASP.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 classicASP using classic JScript than as a new first-class language.

VersionPlatformDateIntroduced withBased on
7.0DesktopCLR 1.02002-01-05.NET Framework 1.0ECMA-262 3rd edition[note 4]
7.1DesktopCLR 1.12003-04-01.NET Framework 1.1ECMA-262 3rd edition[note 4]
8.0DesktopCLR 2.02005-11-07.NET Framework 2.0ECMA-262 3rd edition[note 4]
10.0DesktopCLR 4.02010-08-03.NET Framework 4.0ECMA-262 3rd edition[note 4]

JScript .NET is unsupported in the.NET Compact Framework.[citation needed]

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

[edit]

Notes

[edit]
  1. ^JScript supports various features not specified in the ECMA standard,[17] as does JavaScript.
  2. ^Microsoft said JScript 3.0 was "the first scripting language to fully conform to the ECMA-262 standard".[18]
  3. ^abJScript 5.7 includes an implementation of the ECMAScript Compact Profile (ECMA-327) which turns off features not required by the ES-CP when using the "JScript.Compact" ProgID.[citation needed]
  4. ^abcdJScript .NET is "being developed in conjunction with ECMAScript Edition 4".[27]

References

[edit]
  1. ^"Types of Script Files". Msdn.microsoft.com. 24 October 2011. Retrieved2012-08-17.
  2. ^"Disabling legacy scripting engine JScript in Internet Explorer".Techcommunity Microsoft. com. 2020-10-13. Retrieved2021-11-15.
  3. ^"JScript (ECMAScript3)". Msdn.microsoft.com. 24 October 2011. Retrieved2012-08-17.
  4. ^"What Is WSH?". Msdn.microsoft.com. 24 October 2011. Retrieved2012-08-17.
  5. ^What is JScript 10.0?
  6. ^Cimpanu, Catalin."Microsoft adds option to disable JScript in Internet Explorer".ZDNet. Retrieved2021-11-15.
  7. ^"Option to disable JScript execution in Internet Explorer".support.microsoft.com. Retrieved2021-11-15.
  8. ^Douglas Crockford,The JavaScript Programming Language
  9. ^"The World of JScript, JavaScript, ECMAScript". Blogs.msdn.microsoft.com. 15 August 2007. Retrieved2017-10-21.
  10. ^"script element". Msdn.microsoft.com. Retrieved2017-10-16.
  11. ^"Microsoft-Edge Dev-Guide". Docs.microsoft.com. Retrieved2017-10-18.
  12. ^"Documenting the Web Together". Blogs.windows.com. 18 October 2017. Retrieved2017-10-18.
  13. ^"Javascript Language Reference (Microsoft Docs)". Docs.microsoft.com. Retrieved2017-10-18.
  14. ^"JavaScript Objects (Microsoft Docs)". Docs.microsoft.com. Retrieved2017-10-18.
  15. ^"What's New in ASP.NET 4.5 and Visual Web Developer 11 Beta: The Official Microsoft ASP.NET Site". 13 May 2022.
    "What's New for ASP.NET 4.5 and Web Development in Visual Studio 11 Beta". 12 May 2015.
  16. ^Version Information (Windows Scripting – JScript), Microsoft, retrieved2010-05-31
  17. ^Microsoft JScript Features – Non-ECMA (Windows Scripting – JScript), Microsoft, retrieved2010-05-31
  18. ^Microsoft Embraces ECMA Internet Scripting Standard; Delivers Industry's First ECMA-Compliant Scripting Language, JScript 3.0, In Key Microsoft Products, Microsoft, 1997-06-30, archived fromthe original on 2009-01-12
  19. ^Lakshman, Pratap."JScript Deviations from ES3"(PDF).The Register. Situation Publishing / Microsoft. Retrieved9 February 2020.
  20. ^"Windows 11 22H2 has a different way of using the JS engine? - Microsoft Q&A".
  21. ^(Source:JScript Blog,Jim Hugunin's Thinking Dynamic blog,Source:Blog of Jitu)
  22. ^Niyogi, Shanku (18 March 2010)."The New JavaScript Engine in Internet Explorer 9".IEBlog (archives). Microsoft. Retrieved19 February 2020.
  23. ^Version Information (Windows Scripting – JScript), Microsoft, retrieved2010-05-31
  24. ^"Internet Explorer Standards Support Documents".Open Specifications (Microsoft Docs). Microsoft. Retrieved19 February 2020.
  25. ^"Targeting Microsoft Edge vs. Legacy Engines in JsRT APIs".Microsoft Edge documentation (Microsoft Docs). Microsoft. Retrieved19 February 2020.
  26. ^"Windows 11 22H2 has a different way of using the JS engine? - Microsoft Q&A".
  27. ^What Is JScript .NET?, Microsoft

External links

[edit]
Wikibooks has a book on the topic of:Computer Programming/Hello world
Dialects
Engines
Frameworks
Client-side
Server-side
Multiple
  • Cappuccino
Libraries
People
Other
Graphics and UI
Audio
Multimedia
Web
Data access
Networking
Communication
Administration and
management
Component model
Libraries
Device drivers
Security
.NET
Software factories
IPC
Accessibility
Text and multilingual
support
Versions
Main
Other
Overview
Technologies
Software and engines
Implementations
Events
People
Management
tools
Apps
Shell
Services
File systems
Server
Architecture
Security
Compatibility
API
Games
Discontinued
Games
Apps
Others
Spun off to
Microsoft Store
International
National
Retrieved from "https://en.wikipedia.org/w/index.php?title=JScript&oldid=1309937020"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp