With the recent talk of JavaScript 1.9 there’s been some confusion as to what exactly that version means – especially in relation to other browsers. Here’s a quick breakdown:
- IE 6-7 support JScript 5 (which is equivalent to ECMAScript 3, JavaScript 1.5)
- IE 8 supports JScript 6 (which is equivalent to ECMAScript 3, JavaScript 1.5 – more bug fixes over JScript 5)
- Firefox 1.0 supports JavaScript 1.5 (ECMAScript 3 equivalent)
- Firefox 1.5 supports JavaScript 1.6 (1.5 + Array Extras + E4X + misc.)
- Firefox 2.0 supports JavaScript 1.7 (1.6 + Generator + Iterators + let + misc.)
- Firefox 3.0 supports JavaScript 1.8 (1.7 + Generator Expressions + Expression Closures + misc.)
- The next version of Firefox will support JavaScript 1.9 (1.8 + To be determined)
- Opera supports a language that is equivalent to ECMAScript 3 + Getters and Setters + misc.
- Safari supports a language that is equivalent to ECMAScript 3 + Getters and Setters + misc.
It should be noted that the only browser that supports ‘JavaScript’ are Mozilla-based ones. However, all modern browsers support a version of ECMAScript – at least version 3. JavaScript 1.6-1.9 are just code names for the interim versions of ECMAScript (JavaScript on Gecko) that are leading up to JavaScript 2.0 (ECMAScript 4). Of course no other browser will support another JavaScript 1.6-1.9, since they aren’t obligated to support JavaScript. However, that hasn’t stopped browsers from implementing JavaScript features (such as getters and setters in Opera and Safari).
A big goal of Mozilla is to try implementing difficult ECMAScript features, helping to lead other browsers by example. By using these stepping-stone JavaScript 1.6-1.9 releases as a way to test out bug fixes and functionality both users, and browser vendors, can get a better picture of the changes that will be occurring in the language. This has been a big point in the development of JavaScript 2 (ECMAScript 4) – Mozilla was able to show, through demonstrable real-world usage, that certain features were safe to implement (generators, array comprehension, and getters and setters). Mozilla will be continuing this tradition with JavaScript 1.9, landing new features and bug fixes (the vast majority of which will be from the upcoming ECMAScript 4 specification) – helping to bring the newest version of JavaScript just a couple steps closer.
Kris Zyp (April 22, 2008 at 10:29 pm)
One little correction: IE8/Jscript 6 is not equivalent to EcmaScript 4. I wish :).
Peter R. Wood (April 23, 2008 at 6:13 am)
All of the JavaScript/ECMAScript/JScript terminology confuses me. Is there any place that has a clear and concise overview of the history of these terms, who uses them, what they mean, and how they relate?
John Resig (April 23, 2008 at 7:11 am)
@Kris: D’oh! Total mistake, sorry about that.
@Peter: I’m sure I could arrange something like that. At least this explains the versioning well enough – you’ll be able to refer back to it if I do a post on JavaScript terminology.
Craig Buchek (April 23, 2008 at 9:17 am)
@Peter: The Wikipedia page does a decent job of explaining the naming history. I’ve seen better explanations, but can’t find them online; perhaps they were in physical books.
Craig Buchek (April 23, 2008 at 9:32 am)
The implementations in other browsers are not called “JavaScript”, but I’m not sure that you could say that JavaScript is not “supported” by those other browsers. If you write a script in JavaScript, and tag it with the “text/javascript” media type, the other browsers will most likely be able to run it. That sounds like support to me, even if it’s not 100% compatibility.
John Resig (April 23, 2008 at 10:01 am)
@Craig Buchek: They don’t support JavaScript – they’re absolutely JavaScript compatible, though. The fact that other browsers don’t track JavaScript (as in “JavaScript within Mozilla-based browsers”) changes sort of shows that this is not the case. Generally, it’s pretty easy to show that they’re all compatible. More importantly: They’re ECMAScript 3 compatible, which is where most of the concern should be laid, anyway.
Havvy (April 23, 2008 at 11:58 pm)
At what time can we all get together and just rename it back to livescript when it was incepted?
Tom (April 24, 2008 at 11:35 am)
@Havvy: That’s a great idea. Maybe suggest it to Brendan. (Though I’m sure he’s thought of many such things before.) Just that ‘JavaScript’ is one of those diluted brand names (like Kleenex, Band-Aid, Pong, …). I’m no trademark lawyer by any stretch, but if Mozilla went back to using LiveScript for their own implementation, people might not get confused so easily.
Maciej Stachowiak (April 24, 2008 at 3:55 pm)
In the WebKit project, we usually call our dialect of the language “JavaScript”, even though it is not identical to Mozilla JavaScript. Even though John is right about the official terminology, I think most people think of the scripting languages of browsers as different dialects of JavaScript, and only hardcore standards geeks would recognize the term “ECMAScript”. (For example, JavaScript i the J in AJAX, and people talk about JavaScript libraries, not ECMAScript libraries).
I wish the official language standard could be renamed from ECMAScript to JavaScript but that may be infeasible.
Darren (May 6, 2008 at 11:56 am)
@Craig: These tables may answer your question better than the Wikipedia article for JavaScript: Wikipedia – ECMAScript Dialects and Version Correspondence