[Chapter 21] Reference: Window.parent
Author: David Flanagan
Date: Fri Aug 29 11:21:30 1997

#

| Chapter 21 JavaScript Reference |

# Window.parent Property

## Name

Window.parent Property---the parent of a frame

## Availability

Navigator 2.0, Internet Explorer 3.0

## Synopsis

    window.parent

## Description

The `parent` property is a read-only reference to the Window object that contains `window`. If `window` specifies a top-level window, then `parent` refers to the window itself. If `window` is a frame, then the `parent` property refers to the top-level window or frame that contains `window.`

## Usage

The `parent` property is generally only useful for frames rather than for top-level windows. With a function like the following, you can use the property to determine whether a given Window object is a top-level window or a frame:

    function is_toplevel(w) { return (w.parent == w); }

## See Also

"Window", "Window.top"

Window.Packages |  | Window.prompt()