Rx4AJAX   (Prescription for AJAX)

ECMA-262/Core JavaScript

ECMA-262/Core JavaScript





ECMA-262 Core: Overview of Core JavaScript Objects


Introduction And Review

Everything in JavaScript is an object. Almost!

In JavaScript there are five groups of objects. The first two groups shown here (DOM and BOM) are not core JavaScript and are described at separate Web sites that we plan to build (not available yet):

  1. Document Object Model: All latest version browsers should support the DOM. The DOM is defined and supported by the W3C. The DOM objects provide the Web developer a structured interface to XHTML and XML documents. The DOM has object properties that correspond to CSS properties. Thusly, the DOM gives access to markup and styles that together facilitate Dynamic HTML.


  2. Browser Object Model: Most browsers support the BOM, however, the BOM is not part of the Core JavaScript language. Examples of BOM objects are Window and Navigator. The BOM objects do not conform to an industry level standard, therefore, the BOM objects behavior can vary between browser implementations.

With ECMAScript terminology, the objects belonging to the DOM and BOM would qualify as Host Objects in a typical browser implementation.

The third and fourth object groups are Native Classes and Built-in Objects. These two groups are supported by the ECMA-262 Standard. Therefore, they are part of Core JavaScript and should be supported by all modern browsers.

  1. Native Classes: any object supplied by an ECMAScript implementation independent of the host environment. The Native Classes are the classes defined by ECMAScript.


  2. Built-in Objects: any object supplied by an ECMAScript implementation independent of the host environment, which is present at the start of the execution of an ECMAScript program. Only two native objects fall into the "built-in" group: Global and Math.


  3. User-Defined Object (Class): A user can create a custom class with a JavaScript constructor function. A custom class may contain instance members and class members. The custom class can be used to instantiate new objects of the custom class type. We have built a separate page that defines and illustrates this process. Take this link to User-Defined Class

A Comparison of the Built-In Object and the Native Class

Following is a table that compares the characteristics and behavior of JavaScript core objects.

ECMA-262 Core Objects
Behavior Native Class Built-In
 
These objects behave like a class. yes no
It is possible to use this object as a constructor with the new operator, that is, it is possible to instantiate other objects. yes no
It is possible to invoke this object as a function. yes no
These objects can act as either a superclass or a subclass. yes no
Inheritance applies to these objects. yes no
The access operator is used to access these objects properties and methods. yes Global - no
Math - yes
Methods and properties have individual reference entries under their own name. no Global - yes
Math - no
Methods and properties of these objects are at the top of the scope chain. no yes
Methods behave as: methods functions
Methods operate on an object: yes no
Objects have associated literal forms: Some None
Objects have associated data type: Some None

Top            


Rx4AJAX        About Us | Topic Index | Contact Us | Privacy Policy | 2008 This Site Built By PPThompson