ReadonlycachesAvailable only in secure contexts.
ReadonlyclientReadonlyclosedThe Window.closed read-only property indicates whether the referenced window is closed or not.
ReadonlycookieThe cookieStore read-only property of the Window interface returns a reference to the CookieStore object for the current document context. This is an entry point for the Cookie Store API.
ReadonlycrossReadonlycryptoReadonlycustomThe customElements read-only property of the Window interface returns a reference to the CustomElementRegistry object, which can be used to register new custom elements and get information about previously registered custom elements.
ReadonlydeviceThe devicePixelRatio of Window interface returns the ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.
Readonlydocumentwindow.document returns a reference to the document contained in the window.
ReadonlyeventThe read-only Window property event returns the Event which is currently being handled by the site's code. Outside the context of an event handler, the value is always undefined.
ReadonlyexternalThe external property of the Window API returns an instance of the External interface, which was intended to contain functions related to adding external search providers to the browser. However, this is now deprecated, and the contained methods are now dummy functions that do nothing as per spec.
ReadonlyframeThe Window.frameElement property returns the element (such as
ReadonlyframesReturns the window itself, which is an array-like object, listing the direct sub-frames of the current window.
ReadonlyhistoryThe Window.history read-only property returns a reference to the History object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
ReadonlyindexedReadonlyinnerThe read-only innerHeight property of the Window interface returns the interior height of the window in pixels, including the height of the horizontal scroll bar, if present.
ReadonlyinnerThe read-only Window property innerWidth returns the interior width of the window in pixels (that is, the width of the window's layout viewport). That includes the width of the vertical scroll bar, if one is present.
ReadonlyisReadonlylengthReturns the number of frames (either or
ReadonlylocalReadonlylocationbarReturns the locationbar object.
ReadonlymenubarReturns the menubar object.
The Window.name property gets/sets the name of the window's browsing context.
ReadonlynavigationThe navigation read-only property of the Window interface returns the current window's associated Navigation object.
ReadonlynavigatorThe Window.navigator read-only property returns a reference to the Navigator object, which has methods and properties about the application running the script.
Available only in secure contexts.
Available only in secure contexts.
Available only in secure contexts.
Available only in secure contexts.
OptionalontouchcancelOptionalontouchendOptionalontouchmoveOptionalontouchstartThe Window interface's opener property returns a reference to the window that opened the window, either with open(), or by navigating a link with a target attribute.
ReadonlyorientationReturns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation.
ReadonlyoriginReadonlyoriginThe 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.
ReadonlyouterThe 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.
ReadonlyouterWindow.outerWidth read-only property returns the width of the outside of the browser window. It represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.
ReadonlypageReadonlypageReadonlyparentThe Window.parent property is a reference to the parent of the current window or subframe.
ReadonlyperformanceReadonlypersonalbarReturns the personalbar object.
ReadonlyschedulerReadonlyscreenThe Window property screen returns a reference to the screen object associated with the window. The screen object, implementing the Screen interface, is a special object for inspecting properties of the screen on which the current window is being rendered.
ReadonlyscreenThe 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.
ReadonlyscreenThe Window.screenTop read-only property returns the vertical distance, in CSS pixels, from the top border of the user's browser viewport to the top side of the screen.
ReadonlyscreenThe Window.screenX read-only property returns the horizontal distance, in CSS pixels, of the left border of the user's browser viewport to the left side of the screen.
ReadonlyscreenThe Window.screenY read-only property returns the vertical distance, in CSS pixels, of the top border of the user's browser viewport to the top edge of the screen.
ReadonlyscrollbarsReturns the scrollbars object.
ReadonlyscrollThe read-only scrollX property of the Window interface returns the number of pixels by which the document is currently scrolled horizontally. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number. You can get the number of pixels the document is scrolled vertically from the scrollY property.
ReadonlyscrollThe read-only scrollY property of the Window interface returns the number of pixels by which the document is currently scrolled vertically. This value is subpixel precise in modern browsers, meaning that it isn't necessarily a whole number. You can get the number of pixels the document is scrolled horizontally from the scrollX property.
ReadonlyselfThe Window.self read-only property returns the window itself, as a WindowProxy. It can be used with dot notation on a window object (that is, window.self) or standalone (self). The advantage of the standalone notation is that a similar notation exists for non-window contexts, such as in Web Workers. By using self, you can refer to the global scope in a way that will work not only in a window context (self will resolve to window.self) but also in a worker context (self will then resolve to WorkerGlobalScope.self).
ReadonlysessionReadonlyspeechThe speechSynthesis read-only property of the Window object returns a SpeechSynthesis object, which is the entry point into using Web Speech API speech synthesis functionality.
The status property of the Window interface was originally intended to set the text in the status bar at the bottom of the browser window. However, the HTML standard now requires setting window.status to have no effect on the text displayed in the status bar.
ReadonlystatusbarReturns the statusbar object.
ReadonlytoolbarReturns the toolbar object.
ReadonlytopReturns a reference to the **top**most window in the window hierarchy.
ReadonlyvisualThe visualViewport read-only property of the Window interface returns a VisualViewport object representing the visual viewport for a given window, or null if current document is not fully active.
ReadonlywindowThe window property of a Window object points to the window object itself.
The read-only location property of the Window interface returns a Location object with information about the current location of the document.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsThe addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionswindow.alert() instructs the browser to display a dialog with an optional message, and to wait until the user dismisses the dialog.
Optionalmessage: anyThe window.cancelIdleCallback() method cancels a callback previously scheduled with window.requestIdleCallback().
The Window.close() method closes the current window, or the window on which it was called.
window.confirm() instructs the browser to display a dialog with an optional message, and to wait until the user either confirms or cancels the dialog.
Optionalmessage: stringOptionaloptions: ImageBitmapOptionsOptionaloptions: ImageBitmapOptionsThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Makes a request to bring the window to the front. It may fail due to user settings and the window isn't guaranteed to be frontmost before this method returns.
The Window.getComputedStyle() method returns a live read-only CSSStyleProperties object containing the resolved values of all CSS properties of an element, after applying active stylesheets and resolving any computation those values may contain.
OptionalpseudoElt: string | nullThe 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 Window interface's matchMedia() method returns a new MediaQueryList object that can then be used to determine if the document matches the media query string, as well as to monitor the document to detect when it matches (or stops matching) that media query.
The moveBy() method of the Window interface moves the current window by a specified amount.
The moveTo() method of the Window interface moves the current window to the specified coordinates.
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.
Optionalurl: string | URLOptionaltarget: stringOptionalfeatures: stringThe 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.
Optionaltransfer: Transferable[]Optionaloptions: WindowPostMessageOptionsOpens the print dialog to print the current document.
window.prompt() instructs the browser to display a dialog with an optional message prompting the user to input some text, and to wait until the user either submits the text or cancels the dialog.
Optionalmessage: stringOptional_default: stringThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Optionaloptions: boolean | EventListenerOptionsThe window.requestIdleCallback() method queues a function to be called during a browser's idle periods. This enables developers to perform background and low priority work on the main thread, without impacting latency-critical events such as animation and input response. Functions are generally called in first-in-first-out order; however, callbacks which have a timeout specified may be called out-of-order if necessary in order to run them before the timeout elapses.
Optionaloptions: IdleRequestOptionsThe Window.resizeBy() method resizes the current window by a specified amount.
The Window.resizeTo() method dynamically resizes the window.
The Window.scroll() method scrolls the window to a particular place in the document.
Optionaloptions: ScrollToOptionsThe Window.scrollBy() method scrolls the document in the window by the given amount.
Optionaloptions: ScrollToOptionsWindow.scrollTo() scrolls to a particular set of coordinates in the document.
Optionaloptions: ScrollToOptionsOptionaltimeout: numberOptionaltimeout: numberThe window.stop() stops further resource loading in the current browsing context, equivalent to the stop button in the browser.
The
Windowinterface represents a window containing a DOM document; the document property points to the DOM document loaded in that window.MDN Reference