windows.Window

Window

Type

Values of this type are objects. They contain the following properties:

idOptional
integer. The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the sessions API, in which case a session ID may be present.
focused
boolean. Whether the window is currently the focused window.
topOptional
integer. The offset of the window from the top edge of the screen in pixels. Under some circumstances a Window may not be assigned top property, for example when querying closed windows from the sessions API.
leftOptional
integer. The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the sessions API.
widthOptional
integer. The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the sessions API.
heightOptional
integer. The height of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned height property, for example when querying closed windows from the sessions API.
tabsOptional
array of tabs.Tab. Array of tabs.Tab objects representing the current tabs in the window.
incognito
boolean. Whether the window is incognito.
typeOptional
windows.WindowType. The type of browser window this is.
stateOptional
windows.WindowState. The state of this browser window.
alwaysOnTop
boolean. Whether the window is set to be always on top.
sessionIdOptional
string. The session ID used to uniquely identify a Window obtained from the sessions API.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Acknowledgements

This API is based on Chromium's chrome.windows API. This documentation is derived from windows.json in the Chromium code.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,