HTML DOM Window top( ) Property (original) (raw)

Last Updated : 15 Jun, 2023

The Window top() property is used to return the topmost browser window of a current window. It is a read-only property and it returns a reference to the topmost window in the window hierarchy.
Syntax:

window.top

Return Value: It returns the reference of the topmost window in the window hierarchy.

Below program illustrates the Window top() property :
Checking whether the window is the topmost browser window or not.

html `

Window top() property in HTML