windows.Window
Information about a browser window.
Type
Values of this type are objects
. They contain the following properties:
alwaysOnTop
boolean
. Whether the window is set to be always on top.focused
boolean
. Whether the window is currently the focused window.height
Optionalinteger
. The height of the window, including the frame, in pixels.
id
Optionalinteger
. The ID of the window. Window IDs are unique within a browser session.incognito
boolean
. Whether the window is incognito (private).left
Optionalinteger
. The offset of the window from the left edge of the screen in pixels.sessionId
Optionalstring
. The session ID used to uniquely identify a Window obtained from thesessions
API.state
Optional- A
windows.WindowState
value representing the state of this browser window — maximized, minimized, etc. tabs
Optional- Array of
tabs.Tab
objects representing the current tabs in the window. title
Optional- The title of the browser window. Requires "tabs" permission or host permissions for the active tab's URL. Read only.
top
Optionalinteger
. The offset of the window from the top edge of the screen in pixels.type
Optional- A
windows.WindowType
value representing the type of browser window this is — normal browser window, popup, etc. width
Optionalinteger
. The width of the window, including the frame, in pixels.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
Window | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
alwaysOnTop | ChromeFull support19 | EdgeFull support79 | FirefoxFull support45 | OperaFull support15 | SafariFull support14
| Firefox for AndroidNo supportNo |
focused | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
height | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
id | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
incognito | ChromeFull supportYes | EdgeFull support14
| FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
left | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
sessionId | ChromeFull support31 | EdgeFull support79 | FirefoxNo supportNo | OperaFull support18 | SafariNo supportNo | Firefox for AndroidNo supportNo |
state | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
tabs | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
title | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support56 | OperaNo supportNo | SafariNo supportNo | Firefox for AndroidNo supportNo |
top | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
type | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
width | ChromeFull supportYes | EdgeFull support14 | FirefoxFull support45 | OperaFull supportYes | SafariFull support14 | Firefox for AndroidNo supportNo |
Legend
- Full support
- Full support
- No support
- No support
- See implementation notes.
- Uses a non-standard name.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Acknowledgements
This API is based on Chromium's chrome.windows
API. This documentation is derived from windows.json
in the Chromium code.
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.