windows.getAll()

Gets information about all open windows.

Syntax

browser.windows.getAll(
  getInfo,                // optional object
  function(windows) {...} // function
)

Parameters

getInfoOptional
object. This controls what information is retrieved.
populateOptional
boolean. Defaults to false. If true, each windows.Window object will have a tabs property that contains a list of the tabs.Tab objects for that window. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the "tabs" permission.
windowTypesOptional
array of windows.WindowType. If set, the windows.Window returned will be filtered based on its type. If unset the default filter is set to ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
callback
function. The function is passed the following arguments:
windows
array of windows.Window. All windows matching the specified windowTypes or its default value.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Examples

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,