Search notes:

Browser Object Model: The Window object

The Window object inherits from EventTarget.
The Window object has one instance, named window.

Properties and Methods

alert()
applicationCache Deprecated
back() Non-Standard, Deprecated
blur()
cancelAnimationFrame() Experimental
cancelIdleCallback()
captureEvents() Non-Standard
clearImmediate()
close()
closed
confirm()
console The console object.
convertPointFromNodeToPage() Non-Standard
convertPointFromPageToNode() Non-Standard
customElements Returns a CustomElementRegistry interface.
defaultStatus Deprecated
devicePixelRatio Number of physical pixels that represent a logical (or CSS) pixel. The value 1 represents a classic 96 DPI display, 2 is expected for HiDPI/Retina displays.
dialogArguments Deprecated
document
dump() Non-Standard
event
fetch() Part of the Fetch API. (See demonstration of the asynchronicity of fetch())
find() Non-Standard
focus()
forward() Non-Standard, Deprecated
frameElement
frames
fullScreen Non-Standard
getComputedStyle()
getDefaultComputedStyle()
getSelection()
history A reference to a History object
innerHeight and innerWidth return the size of the browser-window's viewport.
length
localStorage, sessionStorage References to Storage objects
location See also Node.baseURI and document.documentURI.
locationbar, personalbar, scrollbars References to BarProp objects.
matchMedia() TODO: This method seems to be somehow related to the @media CSS at-rule.
menubar
Methods
moveBy()
moveTo()
mozInnerScreenX
mozInnerScreenY
mozPaintCount Non-Standard, Deprecated
name
navigator A reference to a Navigator object
ondragdrop Deprecated
open()
openDialog() Non-Standard
opener
outerHeight
outerWidth
pageXOffset, pageYOffset, scrollX, scrollY pageXOffset is an alias for scrollX, pageYOffset an alias for scrollY.
parent A reference to (another?) Window object
postMessage()
print()
prompt()
PublicKeyCredential See also navigator.credentials
releaseEvents() Non-Standard
requestAnimationFrame()
requestFileSystem() Non-Standard, Deprecated
requestIdleCallback()
resizeBy()
resizeTo()
screen A reference to a Screen object
screenLeft, screenTop, screenX, screenY screenLeft is an alias for screenX, screenTop an alias for screenY. The values correspond to the vertical/horizontal distance, measured in CSS pixels, from the the browser's viewport to the edges of the screen.
scroll()
scrollBy()
scrollByLines() Non-Standard
scrollByPages() Non-Standard
scrollMaxX Non-Standard
scrollMaxY Non-Standard
scrollTo()
self A (WindowProxy) reference to the window instance. Compare with WorkerGlobalScope.self.
setImmediate() Non-Standard
showDirectoryPicker()
showModalDialog() Deprecated
showOpenFilePicker()
showSaveFilePicker()
sidebar Non-Standard
sizeToContent()
speechSynthesis
status
statusbar
stop()
toolbar
top
updateCommands()
visualViewport
window

Scrolling

window.scrollX and window.scrollY indicate the amount in pixels that the document is scrolled horizontally and vertically. window.pageXOffset and window.pageYOffset are aliases for window.scrollX and window.scrollY.
The properties .scrollColumn and .scrollTow set or get the left-most column or top-most row in a pane or window.
Relative scrolling is possible for example with
activeWindow.smallScroll Down    := 105
activeWindow.largeScroll toRight :=   2

See also

In browsers, document.defaultView returns a window object.
onerror
setTimeout

Index