Previous Page
Next Page

ECMAScript

In 1996, Web developers began to complain that Netscape was going in one direction with JavaScript, and Microsoft in a somewhat-compatible but different direction with JScript. Nobody likes to have to code pages to handle different dialects of JavaScript, or have their code work in one browser but not another. Developers wanted a standard. So Netscape went to an international standards body called ECMA and submitted the JavaScript language specification to it, and Microsoft threw in its own comments and suggestions. ECMA did whatever it is that standards bodies do and in June of 1997 produced a standard called ECMA-262 (also known as ECMAScript, a term that just dances off the tongue). This standard closely resembled JavaScript 1.1, but (sigh) was not exactly the same; subsequent versions rectified this problem. If you're interested in reading the official ECMAScript specification, you can download it from http://www.ecma-international.org/. Look for the Standards link and then follow it to the ECMA-262 specification.

ECMAScript also has several flavors, the most current of which is the third edition. At press time, work on the fourth edition was in progress but not yet finalized. It's important to note that ECMAScript is now driving the JavaScript standards process; all current browser makers have made their implementation of JavaScript ECMAScript compliant.

Microsoft claims that Internet Explorer versions 4.0 and up are ECMAScript-compliant, along with some extra, proprietary features that are specific to MSIE. So as long as you write ECMAScript-compatible code, it should run just fine under MSIE 4.0+ and Netscape Navigator 6.0+ (and its successors, the Firefox and Mozilla browser families). But you should always test your code with different browsers, platforms, and versions just to be sure.

Apple's Safari has always supported ECMAScript. The current Safari 2.0, which shipped with Mac OS X 10.4 ("Tiger"), supports ECMAScript-262 Edition 3.


Previous Page
Next Page