Window
The Window
interface represents a window containing a DOM document; the document
property points to the DOM document loaded in that window.
Properties
The cookieStore
read-only property of the Window interface returns a reference to the CookieStore object for the current document context.
The Window.frameElement
property returns the element (such as iframe or object) in which the window is embedded.
The read-only innerHeight
property of the including the height of the horizontal scroll bar, if present.
The read-only Window property innerWidth
returns the interior width of the window in pixels (that is, the width of the window's layout viewport).
Returns the locationbar
object.
The Window.name
property gets/sets the name of the window's browsing context.
Available only in secure contexts.
Available only in secure contexts.
Available only in secure contexts.
Available only in secure contexts.
The originAgentCluster
read-only property of the Window interface returns true
if this window belongs to an origin-keyed agent cluster: this means that the operating system has provided dedicated resources (for example an operating system process) to this window's origin that are not shared with windows from other origins.
The Window.outerHeight
read-only property returns the height in pixels of the whole browser window, including any sidebar, window chrome, and window-resizing borders/handles.
Window.outerWidth
read-only property returns the width of the outside of the browser window.
The Window.parent
property is a reference to the parent of the current window or subframe.
Returns the personalbar
object.
The Window.screenLeft
read-only property returns the horizontal distance, in CSS pixels, from the left border of the user's browser viewport to the left side of the screen.
Returns the scrollbars
object.
Returns a reference to the topmost window in the window hierarchy.
Functions
The getSelection()
method of the Window interface returns the Selection object associated with the window's document, representing the range of text selected by the user or the current position of the caret.
The open()
method of the Window
interface loads a specified resource into a new or existing browsing context (that is, a tab, a window, or an iframe) under a specified name.
The window.postMessage()
method safely enables cross-origin communication between Window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.