|
October 27, 1999 Maximizing Object Model References Tips: October 1999
Yehuda Shiran, Ph.D.
|
|
The topmost object in JavaScript's object model is window. It encapsulates important objects, such as document, navigator, and location. When accessing a property (or method) of the window object, the object specification may be excluded. For example, the following statements both refer to the same JavaScript method:
When writing a script, you can use the notation of your choice. However, you should keep in mind that the first specification is much faster. Let's take a look at another object reference:
In order for the scripting engine to resolve this reference, it first attempts to find an object named
For more information on these issues, refer to Microsoft's documentation.
People who read this tip also read these tips: Look for similar tips by subject: |