windows.get()

Gets details about a window.

Syntax

browser.windows.get(
  windowId,              // integer
  getInfo,               // optional object
  function(window) {...} // function
)

Parameters

windowId
integer.
getInfoOptional
object.
populateOptional
boolean. If true, the windows.Window object will have a tabs property that contains a list of the tabs.Tab objects. 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:
window
windows.Window.

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,