--- title: tabs.Tab slug: Mozilla/Add-ons/WebExtensions/API/tabs/Tab translation_of: Mozilla/Add-ons/WebExtensions/API/tabs/Tab ---
tabs.Tab型はタブについての情報を含んでいます。これはタブの中のコンテンツについての情報へのアクセスを提供します。例えば、コンテンツはどれくらいの大きさか、どのような特別な状態もしくは制限が有効になっているか、など。
この型の値はオブジェクトです。以下のプロパティを含みます:
activeboolean. タブがウィンドウ内でアクティブかどうかを示します。タブのウィンドウがフォーカスされていない場合でも当てはまります。
アクティブなタブは通常一つ検出されます。しかしながら、Firefox for Android上では、拡張機能のポップアップが新しいタブの中で開かれます。このポップアップタブが検出されたとき、アクティブなタブはポップアップが開かれたタブに代えられます。
attention {{optional_inline}}boolean. タブが注目を集めているかを示します。例えば、タブがモーダルダイアログを表示したとき、attentionはtrueになります。audible {{optional_inline}}boolean. タブがミュートではないとき: タブが音を作り出すかどうかです。タブがミュートであるとき: タブがミュートでないなら、音を作り出せたかどうかです。autoDiscardable {{optional_inline}}boolean. Whether the tab can be discarded automatically by the browser when resources are low.cookieStoreId {{optional_inline}}string. タブのクッキーストア。If different tabs can have different cookie stores (for example, to support contextual identity), you can pass this as the storeId option into various methods of the {{WebExtAPIRef("cookies")}} API, to set and get cookies associated with this tab's cookie store. Only present if the extension has the "cookies" permission.discarded {{optional_inline}}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 {{optional_inline}}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 {{optional_inline}}integer. タブの高さのピクセル値。hiddenboolean. タブが隠されている(非表示)かどうか。highlightedboolean. タブがハイライトされているかどうかどうか。 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.multiselect preference.
id {{optional_inline}}integer. タブのID。 タブのIDはブラウザセッショの中でユニークです。The tab ID may also be set to {{WebExtAPIRef('tabs.TAB_ID_NONE')}} for browser windows that don't host content tabs (for example, devtools windows).incognitoboolean. タブがプライベートブラウジングウィンドウの中にあるかどうか。indexinteger. 0を底としたウィンドウの中のタブのインデックス。isArticleboolean. Trueならrendered in Reader Modeで閲覧可能、falseならそれ以外。isInReaderModeboolean. Trueならrendered in Reader Modeで閲覧中、falseならそれ以外。lastAccesseddouble. タブが最後にアクセスされた時刻(単位: milliseconds since the epoch)。mutedInfo {{optional_inline}}openerTabId {{optional_inline}}integer. The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.pinnedboolean. タブがピン留めされているかどうか。selected {{deprecated_inline}}boolean. タブが選択されているかどうか。sessionId {{optional_inline}}string. The session ID used to uniquely identify a Tab obtained from the {{WebExtAPIRef('sessions')}} API.status {{optional_inline}}string. loading か complete のどちらか。successorId {{optional_inline}}integer タブの後継者のID。title {{optional_inline}}string. タブのタイトル。Only present if the extension has the "tabs" permission.url {{optional_inline}}string. タブが表示しているドキュメントのURL。Only present if the extension has the "tabs" permission.width {{optional_inline}}integer. タブの横幅のピクセル値。windowIdinteger. このタブのホストのウィンドウのID。Note: In extension background scripts, the only properties that are available are tabId and windowId.
{{Compat("webextensions.api.tabs.Tab", 10)}}
{{WebExtExamples}}
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.
// Copyright 2015 The Chromium Authors. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.