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
createImageBitmap() Creates an instance of an ImageBitmap from one of the following sources: HTMLImageElement, SVGImageElement, HTMLVideoElement, HTMLCanvasElement, Blob, ImageData, ImageBitmap, OffscreenCanvas, VideoFrame.
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. See also the method WebGLRenderer.setPixelRatio() in three.js.
dialogArguments Deprecated
document
dump() Non-Standard
event
fetch() Returns a Response object. 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 The Visual Viewport WebAPI, viewports in mobile browsers.
window

Events

afterprint
appinstalled
beforeinstallprompt
beforeprint
beforeunload
blur
copy
cut
devicemotion
deviceorientation See also the OrientationSensor andDeviceOrientationEvent interfaces.
deviceorientationabsolute
error
focus
gamepadconnected
gamepaddisconnected
hashchange
languagechange
load
message
messageerror
offline
online
orientationchange Deprecated
pagehide
pagereveal
pageshow
pageswap
paste
popstate
rejectionhandled
resize
scrollsnapchange Experimental
scrollsnapchanging Experimental
storage
unhandledrejection
unload Deprecated
vrdisplayactivate Non-standard, Deprecated
vrdisplayconnect Non-standard, Deprecated
vrdisplaydeactivate Non-standard, Deprecated
vrdisplaydisconnect Non-standard, Deprecated
vrdisplaypresentchange Non-standard, Deprecated

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