Window Interface

Loading...

Overview

See MDN Window Interface

The following code renders all of the first-level Window properties (global variables and functions).

Basic Properties

applicationCache

See Using the application cache

Window.applicationCache

devicePixelRatio

The ratio between the physical pixels and the device independent pixels.

Window.devicePixelRatio

document

The document contained by the window. See Document and Document Lab

Window.document

frameElement

The element in which the window is embedded, or null if not embedded.

Window.frameElement

frames

The array of subframes in the current window.

Window.frames

history

See History Lab

Window.history

innerWidth/Height

The width and height of the content area (including scrollbars).

window.innerWidth Window.innerHeight

length

The number of frames in the window (see also window.frames).

Window.length

location

Get and set the URL of the document resource that's currently loaded. Also see the Location Lab.

Window.location

locationbar

Returns true if the location bar is visible.

Window.locationbar

localStorage

See DOM Storage guide.

name

Gets/sets the name of the window

Window.name

navigator

See Navigator Lab

Window.navigator

opener

Returns a reference to the window that opened this window.

Window.opener

parent

Returns a reference to the parent of this window.

Window.parent

screen

See Screen Lab

Window.screen

screenX/Y

The distance between the browser and the edge of the screen.

Window.screenX Window.screenY

scrollbars

scrollMaxXY

scrollXY

sessionStorage

Window.sessionStorage

status/statusbar

Basic Methods

confirm()

dispatchEvent()

See Creating and triggering events

canceled = !target.dispatchEvent(event)

find()

window.find(str, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog)

getAttention()

window.getAttention()

getComputedStyle()

var style = window.getComputedStyle(element[, pseudoElt])

getSelection()

selection = window.getSelection()

matchMedia()

mql = window.matchMedia(mediaQueryString)

print()

window.print()

prompt()

More TO DO...