What JavaScript implementations are available?
mozilla.org hosts two JavaScript implementations. The first ever JavaScript was created by Brendan Eich at Netscape, and has since been updated to conform to ECMA-262 Edition 5 and later versions. This engine, code named SpiderMonkey, is implemented in C. The Rhino engine, created primarily by Norris Boyd (also at Netscape) is a JavaScript implementation in Java. Like SpiderMonkey, Rhino is ECMA-262 Edition 3 compliant.
Several optimizations such as TraceMonkey (Firefox 3.5), JägerMonkey (Firefox 4) and IonMonkey were added to the SpiderMonkey JavaScript engine from time to time.
Besides the above implementations, there are other popular JavaScript engines such as:-
- Google's V8, which is used in the Google Chrome browser and recent versions of Opera browser.
- The JavaScriptCore (SquirrelFish/Nitro) used in some WebKit browsers such as Apple Safari.
- Carakan in old versions of Opera.
- The Chakra engine used in Internet Explorer (although the language it implements is formally called "JScript" in order to avoid trademark issues).
Each mozilla.org JavaScript engine exposes a public API applications can call on for JavaScript support. By far, the most common host environment for JavaScript is web browsers. Web browsers typically use the public API to create 'host objects' responsible for reflecting the DOM into JavaScript.
Another common application for JavaScript is as a (web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages.
JavaScript resources
-
SpiderMonkey
- Information specific to JavaScript in C engine (aka SpiderMonkey) embedding.
-
Rhino
- Information specific to the JavaScript implementation written in Java (aka Rhino). Language resources
- Pointers to published JavaScript standards. A re-introduction to JavaScript
- JavaScript guide and JavaScript reference.