tabs.Tab

This type contains information about a tab.

Type

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

idOptional
integer. The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the sessions API, in which case a session ID may be present. Tab ID can also be set to tabs.TAB_ID_NONE for apps and devtools windows.
index
integer. The zero-based index of the tab within its window.
windowId
integer. The ID of the window the tab is contained within.
openerTabIdOptional
integer. The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.
selected
boolean. Whether the tab is selected.
highlighted
boolean. Whether the tab is highlighted.
active
boolean. Whether the tab is active in its window. (Does not necessarily mean the window is focused.)
pinned
boolean. Whether the tab is pinned.
audibleOptional
boolean. If the tab is not muted: whether the tab is producing sound. If the tab is muted: whether the tab would be producing sound, if it were not muted.
mutedInfoOptional
tabs.MutedInfo. Current tab muted state and the reason for the last state change.
urlOptional
string. The URL the tab is displaying. This property is only present if the extension's manifest includes the "tabs" permission.
titleOptional
string. The title of the tab. This property is only present if the extension's manifest includes the "tabs" permission.
favIconUrlOptional
string. The URL of the tab's favicon. This property is only present if the extension's manifest includes the "tabs" permission. It may also be an empty string if the tab is loading.
statusOptional
string. Either loading or complete.
incognito
boolean. Whether the tab is in an incognito window.
widthOptional
integer. The width of the tab in pixels.
heightOptional
integer. The height of the tab in pixels.
sessionIdOptional
string. The session ID used to uniquely identify a Tab obtained from the sessions API.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Acknowledgements

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

Document Tags and Contributors

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