11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure B-6: <strong>The</strong> Internet Explorer 4+ object model<br />

Although later versions of Internet Explorer add a tremendous amount of new features, the core<br />

aspects of the IE Document Object Model remain essentially the same.<br />

Internet Explorer 5.5+, Netscape 6, and the DOM<br />

Support for DOM properties and methods matures gradually in versions of Internet Explorer but<br />

occurs all at once in Netscape with version 6. Netscape 6 keeps the so-called DOM0 document<br />

objects, basically those found in the traditional model, and adds support for W3C DOM<br />

methods. Internet Explorer 5.5 provides decent support for parts of the DOM as well, and<br />

Internet Explorer 6 claims to be DOM-compliant, although both 5.5 and 6.0 still provide the<br />

model of IE4 for backward compatibility.<br />

In this modern model all parts of the page are scriptable, and the document is represented as a<br />

tree. Access to elements and attributes is standardized, as are a core set of properties and<br />

methods for document objects that largely reflect their corresponding element‘s HTML 4<br />

attributes as discussed in the following sections.<br />

<strong>JavaScript</strong> Object <strong>Reference</strong><br />

This section lists the <strong>JavaScript</strong> objects as well as their properties, methods, and support. <strong>The</strong><br />

object entries include all or some of the following information:<br />

Object Name (Traditional name, IE name, DOM Name) Since objects can have many<br />

names, we list as many of them as possible. We start first with more traditional or IEspecific<br />

names because organizing by DOM Names would bunch everything up since<br />

they all start with the prefix HTML.<br />

Type of Object Indicates if the object is primarily document- or browser-oriented and if<br />

it is proprietary.<br />

Description Briefly describes the purpose of this object and how to access it.<br />

Constructor Describes the syntax and semantics of the object‘s constructor, if the<br />

object may be instantiated.<br />

Properties Lists the properties the object provides and their support in various<br />

browsers. Also includes any standards that may apply to each property, particularly if<br />

they are different than the overall entry in the support section.<br />

Methods Lists the methods the object provides and their support in various browsers.<br />

Also includes any standards that may apply to each, particularly if they are different<br />

than the overall entry in the support section.<br />

Support Indicates the browsers that support the object as well as any standards that<br />

apply to it. <strong>The</strong> browser version indicates the first version in which the object was<br />

scriptable.<br />

Notes Gives other relevant information for the object, such as pitfalls, incompatibilities,<br />

and bugs.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!