[Chapter 21] JavaScript Reference
Author: David Flanagan
Date: Fri Aug 29 11:13:20 1997

#

| Chapter 21 |

# 21. JavaScript Reference

Contents:
Select a new section and then

This section of the book is a complete reference for all JavaScript objects, properties, constants, arrays, functions, methods, and event handlers. It even includes documentation for the Java class netscape.javascript.JSObject, which is used by LiveConnect to allow Java applets to communicate with JavaScript.

## 21.1 How to Find the Reference Page You Want

The reference section is arranged alphabetically, and all properties, methods, and event handlers are alphabetized by their full name, which includes the name of the object of which they are a part. For example, if you want to read about the `write()` method of the Document object, look up "Document.write", not just "write".

JavaScript defines some global variables, such as `navigator` and `Packages`, which, strictly speaking, are properties of the Window object. They are never used this way, however, and so these few "globals" are alphabetized without the "Window." prefix. Note, however that other properties, methods, and event handlers of the Window object, such as `location,` `alert(),` and `onload()` are documented as part of the Window object. Thus you should look these up as "Window.location", "Window.alert()", and "Window.onload()".

Sometimes you may need to look up a method or property without knowing what object it is part of. Or you may not be able to find a reference page where you expect it. The table of contents that follows will help you with this. The left column lists the names of all objects, functions, properties, methods, and event handlers in JavaScript, and the right column gives the full name of the reference page on which documentation can be found. Note that some property, method, and event-handler names are used by more than one object. So, for example, if you look up the `toString()` method in the table, you find several reference pages that document different objects' implementations of that method.

The Data-Tainting Security Model |  | Table of Contents