tabs.Tab
tabs.Tab 型はタブについての情報を含んでいます。これはタブの中のコンテンツについての情報へのアクセスを提供します。例えば、コンテンツはどれくらいの大きさか、どのような特別な状態もしくは制限が有効になっているか、など。
Type
この型の値はオブジェクトです。以下のプロパティを含みます:
active-
boolean. タブがウィンドウ内でアクティブかどうかを示します。タブのウィンドウがフォーカスされていない場合でも当てはまります。アクティブなタブは通常一つ検出されます。しかしながら、Firefox for Android 上では、拡張機能のポップアップが新しいタブの中で開かれます。このポップアップタブが検出されたとき、アクティブなタブはポップアップが開かれたタブに代えられます。
attention省略可-
boolean. タブが注目を集めているかを示します。例えば、タブがモーダルダイアログを表示したとき、attentionはtrueになります。 audible省略可-
boolean. タブがミュートではないとき: タブが音を作り出すかどうかです。タブがミュートであるとき: タブがミュートでないなら、音を作り出せたかどうかです。 autoDiscardable省略可-
boolean. Whether the tab can be discarded automatically by the browser when resources are low. -
string. タブのクッキーストア。If different tabs can have different cookie stores (for example, to support contextual identity), you can pass this as thestoreIdoption into various methods of thecookiesAPI, to set and get cookies associated with this tab's cookie store. Only present if the extension has the"cookies"permission. discarded省略可-
boolean. タブが破棄されたか。 A discarded tab is one whose content has been unloaded from memory, but is still visible in the tab strip. Its content gets reloaded the next time it's activated. favIconUrl省略可-
string. タブの favicon の URL。Only present if the extension has the"tabs"permission. It may also be an empty string if the tab is loading. height省略可-
integer. タブの高さのピクセル値。 -
boolean. タブが隠されている(非表示)かどうか。 highlighted-
boolean. タブがハイライトされているかどうかどうか。 An active tab is always highlighted, but some browsers may allow additional tabs to be highlighted, for example by clicking them while holding Ctrl or ⌘ Command keys.Firefox for Android doesn't support highlighting multiple tabs, and Firefox desktop requires the
browser.tabs.multiselectpreference. id省略可-
integer. タブの ID。 タブの ID はブラウザセッショの中でユニークです。The tab ID may also be set totabs.TAB_ID_NONE(en-US) for browser windows that don't host content tabs (for example, devtools windows). incognito-
boolean. タブがプライベートブラウジングウィンドウの中にあるかどうか。 index-
integer. 0 を底としたウィンドウの中のタブのインデックス。 isArticle-
boolean. True ならrendered in Reader Modeで閲覧可能、false ならそれ以外。 isInReaderMode-
boolean. True ならrendered in Reader Modeで閲覧中、false ならそれ以外。 lastAccessed-
double. タブが最後にアクセスされた時刻(単位: milliseconds since the epoch)。 mutedInfo省略可-
tabs.MutedInfo. The current muted state for the tab and the reason for the last state change. openerTabId省略可-
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. タブがピン留めされているかどうか。 selected非推奨-
boolean. タブが選択されているかどうか。 sessionId省略可-
string. The session ID used to uniquely identify aTabobtained from thesessionsAPI. status省略可-
string. loading か complete のどちらか。 successorId省略可-
integerタブの後継者の ID。 title省略可-
string. タブのタイトル。Only present if the extension has the"tabs"permission. url省略可-
string. タブが表示しているドキュメントの URL。Only present if the extension has the"tabs"permission. width省略可-
integer. タブの横幅のピクセル値。 windowId-
integer. このタブのホストのウィンドウの ID。
メモ: In extension background scripts, the only properties that are available are tabId and windowId.
Browser compatibility
BCD tables only load in the browser
Example extensions
メモ: 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.