O'Reilly logo

JavaScript Pocket Reference, 2nd Edition by David Flanagan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Window

Synopsis

self
window
window.frames[i]

Properties

The Window object defines the following properties. Non-portable, browser-specific properties are listed separately after this list. Note that the Window object is the Global object for client-side JavaScript; therefore the Window object also has the properties listed on the Global reference page.

closed

A read-only boolean value that specifies whether the window has been closed.

defaultStatus

A read/write string that specifies a persistent message to appear in the status line whenever the browser is not displaying another message.

document

A read-only reference to the Document object contained in this window or frame. See Document.

frames[ ]

An array of Window objects, one for each frame contained within the this window. Note that frames referenced by the frames[ ] array may themselves contain frames and may have a frames[ ] array of their own.

history

A read-only reference to the History object of this window or frame. See History.

length

Specifies the number of frames contained in this window or frame. Same as frames.length.

location

The Location object for this window or frame. See Location. This property has special behavior: if you assign a URL string to it, the browser loads and displays that URL.

name

A string that contains the name of the window or frame. The name is specified with the Window.open( ) method, or with the name attribute of a <frame> tag. Read-only in JS 1.0; read/write in JS 1.1.

navigator

A read-only reference to the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required