windowproperty and all properties on the Window are available directly in scripts. The Window object is also available as
thisin the root scope of a script (ie, outside of any Function).
Height of the browser window in CSS pixels excluding any browser chrome.
Width of the browser window in CSS pixels exluding any browser chrome.
Height of the browser window in CSS pixels including any browser chrome.
Width of the browser window in CSS pixels including any browser chrome.
Opens a new tab or window for the specified
- the url to open or
''to open an empty window.
- must be one of:
- open in new window, the default
- open in parent page/frame
- open in current page/frame
- open in top page
- open in the window with the specified name
'<name>=<value>'pairs where the valid names are
trueto replace the contents instead of opening a new window.
this (usually something other than the global
window, like the
contentwindow, or return value of
message will be available in the
MessageEvent.data property on the event passed to the onmessage event listener. To ensure the window's content has not changed while the message is in flight,
expectedOrigin must match
this.origin (or be
'*' to ignore check and possibly send the message to another site). The elements of
this and no longer available in the context that called
Displays a message box containing an input box to the user with the specified message. The input box will be prepopulated with
default if it is specified. Returns the String the user typed in the input box if the user clicks ok and
null if they click cancel. Script execution is paused while the message box is displayed. See also
callback to be called before the next time the browser renders a frame to the screen. Must be called each time you'd like to schedule another frame. The
time parameter to callback is the number of milliseconds since the page loaded. Returns a unique handle that can be passed to
cancelAnimationFrame() to stop
callback from being called.
Called before the page is navigated away from. Return a non-empty String from
listener to display a dialog box that gives the user the option to remain on the current page.
postMessage() is called on
Called when the page navigation changes. See also History.