Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

tabs.Tab

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!

The type tabs.Tab contains information about a tab. This provides access to information about what content is in the tab, how large the content is, what special states or restrictions are in effect, and so forth.

Type

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

active
boolean. Whether the tab is active in its window. This may be true even if the tab's window is not currently focused.
audible Optional
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.
favIconUrl Optional
string. The URL of the tab's favicon. Only present if the add-on has the "tabs" permission. It may also be an empty string if the tab is loading.
height Optional
integer. The height of the tab in pixels.
highlighted
boolean. Whether the tab is highlighted.
id Optional
integer. The tab's ID. Tab IDs are unique within a browser session. The tab ID may also be set to tabs.TAB_ID_NONE for browser windows that don't host content tabs (for example, devtools windows).
incognito
boolean. Whether the tab is in a private browsing window.
index
integer. The zero-based index of the tab within its window.
mutedInfo Optional
tabs.MutedInfo. The current muted state for the tab and the reason for the last state change.
openerTabId Optional
integer. The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.
pinned
boolean. Whether the tab is pinned.
selected
boolean. Whether the tab is selected.
sessionId Optional
string. The session ID used to uniquely identify a Tab obtained from the sessions API.
status Optional
string. Either loading or complete.
title Optional
string. The title of the tab. Only present if the add-on has the "tabs" permission.
url Optional
string. The URL of the document that the tab is displaying. Only present if the add-on has the "tabs" permission.
width Optional
integer. The width of the tab in pixels.
windowId
integer. The ID of the window that hosts this tab.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic Support Yes Yes 45.0 No 33

Compatibility notes

Edge

  • 'highlighted', 'selected', and 'openerTabId' are not supported.

Acknowledgements

This API is based on Chromium's chrome.tabs API. This documentation is derived from tabs.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.

ドキュメントのタグと貢献者

 このページの貢献者: Sheppy, Jeremie, wbamberg
 最終更新者: Sheppy,