Datasheet

Chapter 1: What Is JavaScript?
3
JavaScript Implementations
Though JavaScript and ECMAScript are often used synonymously, JavaScript is much more than just
what is defined in ECMA - 262. Indeed, a complete JavaScript implementation is made up of the following
three distinct parts (see Figure 1 - 1 ):
The Core (ECMAScript)
The Document Object Model (DOM)
The Browser Object Model (BOM)
JavaScript
ECMAScript DOM BOM
Figure 1 - 1
ECMAS cript
ECMAScript , the language defined in ECMA - 262, isn t tied to web browsers. In fact, the language
has no methods for input or output whatsoever. ECMA - 262 defines this language as a base upon
which more - robust scripting languages may be built. Web browsers are just one host environment
in which an ECMAScript implementation may exist. A host environment provides the base
implementation of ECMAScript as well as extensions to the language designed to interface with the
environment itself. Extensions, such as the Document Object Model (DOM), use ECMAScript ’ s core
types and syntax to provide additional functionality that s more specific to the environment. Other host
environments include ScriptEase and Adobe Flash.
What exactly does ECMA - 262 specify if it doesn t reference web browsers? On a very basic level, it
describes the following parts of the language:
Syntax
Types
Statements
Keywords
Reserved words
Operators
Objects
c01.indd 3c01.indd 3 12/8/08 11:21:50 AM12/8/08 11:21:50 AM