aboutsummaryrefslogtreecommitdiff
path: root/files/ja/mozilla/add-ons/webextensions/api/tabs/tab/index.html
blob: fcab149353b743ec7c2fc50f005a383b0ef79a8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: tabs.Tab
slug: Mozilla/Add-ons/WebExtensions/API/tabs/Tab
translation_of: Mozilla/Add-ons/WebExtensions/API/tabs/Tab
---
<div>{{AddonSidebar()}}</div>

<p><strong><code>tabs.Tab</code></strong>型はタブについての情報を含んでいます。これはタブの中のコンテンツについての情報へのアクセスを提供します。例えば、コンテンツはどれくらいの大きさか、どのような特別な状態もしくは制限が有効になっているか、など。</p>

<h2 id="Type">Type</h2>

<p>この型の値はオブジェクトです。以下のプロパティを含みます:</p>

<dl class="reference-values">
 <dt><code>active</code></dt>
 <dd>
 <p><code>boolean</code>. タブがウィンドウ内でアクティブかどうかを示します。タブのウィンドウがフォーカスされていない場合でも当てはまります。</p>

 <p>アクティブなタブは通常一つ検出されます。しかしながら、Firefox for Android上では、拡張機能のポップアップが新しいタブの中で開かれます。このポップアップタブが検出されたとき、アクティブなタブはポップアップが開かれたタブに代えられます。</p>
 </dd>
 <dt><code>attention</code> {{optional_inline}}</dt>
 <dd><code>boolean</code>. タブが注目を集めているかを示します。例えば、タブがモーダルダイアログを表示したとき、<code>attention</code><code>true</code>になります。</dd>
 <dt><code>audible</code> {{optional_inline}}</dt>
 <dd><code>boolean</code>. タブがミュートではないとき: タブが音を作り出すかどうかです。タブがミュートであるとき: タブがミュートでないなら、音を作り出せたかどうかです。</dd>
 <dt><code>autoDiscardable</code> {{optional_inline}}</dt>
 <dd><code>boolean</code>. Whether the tab can be discarded automatically by the browser when resources are low.</dd>
 <dt><code>cookieStoreId</code> {{optional_inline}}</dt>
 <dd><code>string</code>. タブのクッキーストア。If different tabs can have different cookie stores (for example, to support <a href="https://wiki.mozilla.org/Security/Contextual_Identity_Project/Containers">contextual identity</a>), you can pass this as the <code>storeId</code> 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 <code>"cookies"</code> <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permission</a>.</dd>
 <dt><code>discarded</code> {{optional_inline}}</dt>
 <dd><code>boolean</code>. タブが破棄されたか。 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.</dd>
 <dt><code>favIconUrl</code> {{optional_inline}}</dt>
 <dd><code>string</code>. タブのfaviconのURL。Only present if the extension has the <code>"tabs"</code> <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permission</a>. It may also be an empty string if the tab is loading.</dd>
 <dt><code>height</code> {{optional_inline}}</dt>
 <dd><code>integer</code>. タブの高さのピクセル値。</dd>
 <dt><code>hidden</code></dt>
 <dd><code>boolean</code>. タブが隠されている(非表示)かどうか。</dd>
 <dt><code>highlighted</code></dt>
 <dd>
 <p><code>boolean</code>. タブがハイライトされているかどうかどうか。 An active tab is always highlighted, but some browsers may allow additional tabs to be highlighted, for example by clicking them while holding <kbd>Ctrl</kbd> or <kbd>⌘ Command</kbd> keys.</p>

 <p>Firefox for Android doesn't support highlighting multiple tabs, and Firefox desktop requires the <code>browser.tabs.multiselect</code> preference.</p>
 </dd>
 <dt><code>id</code> {{optional_inline}}</dt>
 <dd><code>integer</code>. タブの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).</dd>
 <dt><code>incognito</code></dt>
 <dd><code>boolean</code>. タブがプライベートブラウジングウィンドウの中にあるかどうか。</dd>
 <dt><code>index</code></dt>
 <dd><code>integer</code>. 0を底としたウィンドウの中のタブのインデックス。</dd>
 <dt><code>isArticle</code></dt>
 <dd><code>boolean</code>. Trueなら<a href="/en-US/Add-ons/WebExtensions/API/tabs/toggleReaderMode">rendered in Reader Mode</a>で閲覧可能、falseならそれ以外。</dd>
 <dt><code>isInReaderMode</code></dt>
 <dd><code>boolean</code>. Trueなら<a href="/en-US/Add-ons/WebExtensions/API/tabs/toggleReaderMode">rendered in Reader Mode</a>で閲覧中、falseならそれ以外。</dd>
 <dt><code>lastAccessed</code></dt>
 <dd><code>double</code>. タブが最後にアクセスされた時刻(単位: <a class="external external-icon" href="https://en.wikipedia.org/wiki/Unix_time">milliseconds since the epoch</a>)。</dd>
 <dt><code>mutedInfo</code> {{optional_inline}}</dt>
 <dd>{{WebExtAPIRef('tabs.MutedInfo')}}. The current muted state for the tab and the reason for the last state change.</dd>
 <dt><code>openerTabId</code> {{optional_inline}}</dt>
 <dd><code>integer</code>. The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.</dd>
 <dt><code>pinned</code></dt>
 <dd><code>boolean</code>. タブがピン留めされているかどうか。</dd>
 <dt><code>selected</code> {{deprecated_inline}}</dt>
 <dd><code>boolean</code>. タブが選択されているかどうか。</dd>
 <dt><code>sessionId</code> {{optional_inline}}</dt>
 <dd><code>string</code>. The session ID used to uniquely identify a <code>Tab</code> obtained from the {{WebExtAPIRef('sessions')}} API.</dd>
 <dt><code>status</code> {{optional_inline}}</dt>
 <dd><code>string</code>. <em>loading</em><em>complete</em> のどちらか。</dd>
 <dt><code>successorId</code> {{optional_inline}}</dt>
 <dd><code>integer</code> タブの後継者のID。</dd>
 <dt><code>title</code> {{optional_inline}}</dt>
 <dd><code>string</code>. タブのタイトル。Only present if the extension has the <code>"tabs"</code> <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permission</a>.</dd>
 <dt><code>url</code> {{optional_inline}}</dt>
 <dd><code>string</code>. タブが表示しているドキュメントのURL。Only present if the extension has the <code>"tabs"</code> <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/permissions">permission</a>.</dd>
 <dt><code>width</code> {{optional_inline}}</dt>
 <dd><code>integer</code>. タブの横幅のピクセル値。</dd>
 <dt><code>windowId</code></dt>
 <dd><code>integer</code>. このタブのホストのウィンドウのID。</dd>
 <dt>
 <div class="blockIndicator note">
 <p>Note: In extension background scripts, the only properties that are available are tabId and <strong>windowId.</strong></p>
 </div>
 </dt>
</dl>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>

<p>{{Compat("webextensions.api.tabs.Tab", 10)}}</p>

<p>{{WebExtExamples}}</p>

<div class="note"><strong>Acknowledgements</strong>

<p>This API is based on Chromium's <a href="https://developer.chrome.com/extensions/tabs#type-Tab"><code>chrome.tabs</code></a> API. This documentation is derived from <a href="https://chromium.googlesource.com/chromium/src/+/master/chrome/common/extensions/api/tabs.json"><code>tabs.json</code></a> in the Chromium code.</p>

<p>Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.</p>
</div>

<div class="hidden">
<pre>// 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.
</pre>
</div>