↑
Main Page
ECMAScript editions
Figure 1-2
Each browser has its own implementation of the ECMAScript interface, which is then extended to con-
tain the DOM and BOM (discussed in the following sections). There are other languages that also imple-
ment and extend ECMAScript such as Windows Scripting Host (WSH), ActionScript in Macromedia
Flash and Director, and Nombas ScriptEase.
ECMAScript editions
ECMAScript is separated into editions rather than versions because it is defined in a standard called
ECMA-262. Like any standard, ECMA-262 can be edited and updated. When a major update occurs, a
new edition of the standard is published. The most recent edition of ECMA-262 is edition 3, released in
December of 1999. The first edition of ECMA-262 was essentially the same as Netscape’s JavaScript 1.1
with all browser-specific code removed, but with a few changes. First, ECMA-262 required support
for the Unicode Standard (to support multiple languages). Second, it required that objects be platform-
independent (Netscape’s JavaScript 1.1 actually had different implementations of objects, such as the
Date object, depending on the platform). This was a major reason why JavaScript 1.1 and 1.2 did not
conform to the first edition of ECMA-262.
The second edition of ECMA-262 was largely editorial in nature. The standard was updated in order to
get into strict agreement with ISO/IEC-16262 and didn’t feature any additions, changes, or omissions.
ECMAScript implementations typically don’t use the second edition as a measure of conformance.
The third edition of ECMA-262 was the first real update to the standard. It provides updates to string
handling, the definition of errors, and numeric outputs. It also adds support for regular expressions, new
control statements, try...catch exception handling, and small changes to better prepare the standard for
internationalization. To many, this marked the arrival of ECMAScript as a true programming language.
What does ECMAScript conformance mean?
In ECMA-262, the definition of ECMAScript conformance is laid out. A scripting language must sub-
scribe to four basic tenets:
?
A conforming implementation must support all “types, values, objects, properties, functions,
and program syntax and semantics” (ECMA-262, p. 1) as they are described in ECMA-262.
?
A conforming implementation must support the Unicode Character Standard.
?
A conforming implementation may add “additional types, values, objects, properties, and func-
tions” that are not specified in ECMA-262. ECMA-262 describes these additions as primarily
new objects or new properties of objects not given in the specification.
?
A conforming implementation may support “program and regular expression syntax” that are
not defined in ECMA-262 (meaning that the built-in regular expression support is allowed to be
altered and extended).
All implementations of ECMAScript must be in agreement with these criteria.
ECMAScript
JavaScript ActionScript ScriptEase
4
Chapter 1
04_579088 ch01.qxd 3/28/05 11:34 AM Page 4
Free JavaScript Editor
Ajax Editor
©
→ R7