This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

top

Summary

Retrieves the topmost ancestor window.

Property of dom/Windowdom/Window

Syntax

var topwindow = window.top;
window.top = value;

Return Value

Returns an object of type DOM NodeDOM Node

Examples

var topwindow=window.top;

Usage

 This property is especially useful when you are dealing with a window that is in a subframe of a parent or parents, and you want to get to the top-level frameset.

Syntax

Attributions

  • Mozilla Developer Network cc-by-sa-small-wpd.svg: [top Article]

  • Microsoft Developer Network: [top Property Article]