This is the document in which the Element object is instantiated. Although this is not generally available as an object property in Netscape, it is supported by the Window object by virtue of it being a global value. This means that for most cases, the scope chain adds the document object to all objects, or at least it appears as if they have the property. However, in Netscape, the document property is shared by all objects in the window rather than each having its own private document property that refers to the same document object. The difference is subtle.
Be careful when blindly using the properties of Element objects, as a property such as this can lead you into a recursive loop situation.
Prev | Home | Next |
Element.dir | Up | Element.doScroll() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |