Re: Correct case of object names

Jesse McCarthy <mccarthy36@earthlink.net> wrote:

> While experimenting with the DOM in Netscape 6.1,
> I must refer to this object  as "document" (note
> difference in case).

Yes. This is not inconsistent.

The object you are referring to is the 'document' property of the window
object. JavaScript puts properties of window into global scope so you
don't always have to write 'window.document'. The property's name is
irrelevant - it could equally be called 'window.custardPudding' - but
the object it contains is indeed of class Document, capital-D. (Or
rather, its subclass HTMLDocument.)

-- 
Andrew Clover
Technical Consultant
1VALUE.com AG

Received on Monday, 5 November 2001 05:14:10 UTC