Outside the web, JavaScript interpreters are embedded in a number of tools. Each of these applications provides its own object model which provides access to the host environment, with the core JavaScript language remaining mostly the same in each application.
- ActionScript, the programming language used in Adobe Flash, is another implementation of the ECMAScript standard.
- Apple's Dashboard Widgets, Microsoft's Gadgets, Yahoo! Widgets, Google Desktop Gadgets, Serence Klipfolio are implemented using JavaScript.
- The Mozilla platform, which underlies Firefox and some other web browsers, uses JavaScript to implement the graphical user interface (GUI) of its various products.
- Adobe's Acrobat and Adobe Reader (formerly Acrobat Reader) support JavaScript in PDF files.[33]
- Tools in the Adobe Creative Suite, including Photoshop, Illustrator, Dreamweaver and InDesign, allow scripting through JavaScript.
- Microsoft's Active Scripting technology supports the JavaScript-compatible JScript as an operating system scripting language.
- The Java programming language, in version SE 6 (JDK 1.6), introduced the
javax.scriptpackage, including a JavaScript implementation based on Mozilla Rhino. Thus, Java applications can host scripts that access the application's variables and objects, much like web browsers host scripts that access the browser's Document Object Model (DOM) for a webpage.[34][35] - The Qt C++ toolkit includes a
QtScriptmodule to interpret JavaScript, analogous tojavax.script.[36] - OpenOffice.org office application suite allows for JavaScript as one of its scripting languages.
- Adobe Integrated Runtime is a JavaScript runtime that allows developers to create desktop applications.
- The interactive music signal processing software Max/MSP released by Cycling '74, offers a JavaScript model of its environment for use by developers. It allows much more precise control than the default GUI-centric programming model.
- Late Night Software's JavaScript OSA (aka JavaScript for OSA, or JSOSA), is a freeware alternative to AppleScript for Mac OS X. It is based on the Mozilla 1.5 JavaScript implementation, with the addition of a
MacOSobject for interaction with the operating system and third-party applications.[37] - ECMAScript was included in the VRML97 standard for scripting nodes of VRML scene description files.
- Some high-end Philips universal remote panels, including TSU9600 and TSU9400, can be scripted using JavaScript.[38]
- Sphere is an open source and cross platform computer program designed primarily to make role-playing games that use JavaScript as a scripting language.
- The open-source Re-Animator framework allows developing 2D sprite-based games using JavaScript and XML.
- Methabot is a web crawler that uses JavaScript as scripting language for custom filetype parsers and data extraction using E4X.
- Unity game engine supports three scripting languages: JavaScript, C#, and Boo.[39]
- DX Studio (3D engine) uses the SpiderMonkey implementation of JavaScript for game and simulation logic.[40]
Debugging
Within JavaScript, access to a debugger becomes invaluable when developing large, non-trivial programs. Because there can be implementation differences between the various browsers (particularly within the Document Object Model) it is useful to have access to a debugger for each of the browsers that a web application targets.
Script debuggers are available for Internet Explorer, Firefox, Safari, Google Chrome, and Opera.
Three debuggers are available for Internet Explorer: Microsoft Visual Studio is the richest of the three, closely followed by Microsoft Script Editor (a component of Microsoft Office[41]), and finally the free Microsoft Script Debugger which is far more basic than the other two. The free Microsoft Visual Web Developer Express provides a limited version of the JavaScript debugging functionality in Microsoft Visual Studio.
Web applications within Firefox can be debugged using the Firebug add-on, or the older Venkman debugger. Firefox also has a simpler built-in Error Console, which logs and evaluates JavaScript. It also logs CSS errors and warnings.
Opera includes a richer set of tools called DragonFly.
WebKit's Web Inspector includes a JavaScript debugger[42] in Apple's Safari.
Some debugging aids are themselves bits of JavaScript code built to run on the Web. JSlint scans code for violations of a standard coding style. Web development bookmarklets and Firebug Lite provide variations on the idea of the cross-browser JavaScript console.
Since JavaScript is interpreted, loosely-typed, and may be hosted in varying environments, each incompatible with the others, a programmer has to take extra care to make sure the code executes as expected in as wide a range of circumstances as possible, and that functionality degrades gracefully when it does not.
Versions
| Version | Release date | Equivalent to | Netscape Navigator | Mozilla Firefox | Internet Explorer | Opera | Safari | Google Chrome |
|---|---|---|---|---|---|---|---|---|
| 1.0 | March 1996 | 2.0 | 3.0 | |||||
| 1.1 | August 1996 | 3.0 | ||||||
| 1.2 | June 1997 | 4.0-4.05 | ||||||
| 1.3 | October 1998 | ECMA-262 1st edition / ECMA-262 2nd edition | 4.06-4.7x | 4.0 | ||||
| 1.4 | Netscape Server | |||||||
| 1.5 | November 2000 | ECMA-262 3rd edition | 6.0 | 1.0 | 5.5 (JScript 5.5), 6 (JScript 5.6), 7 (JScript 5.7), 8 (JScript 6) | 6.0, 7.0, 8.0, 9.0 | ||
| 1.6 | November 2005 | 1.5 + Array extras + Array and String generics + E4X | 1.5 | 3.0, 3.1 | ||||
| 1.7 | October 2006 | 1.6 + Pythonic generators + Iterators + let | 2.0 | 3.2, 4.0 | 1.0 | |||
| 1.8 | June 2008 | 1.7 + Generator expressions + Expression closures | 3.0 | |||||
| 1.8.1 | 1.8 + Minor Updates | 3.5 | ||||||
| 1.9 | 1.8.1 + ECMAScript 5 Compliance | 4 |
No comments:
Post a Comment