blob: 88e750ec05855babf9e5c079996a253a025e8564 (
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
|
<p id="classSummary">
Use the <code>chrome.tabs</code> module
to interact with the browser's tab system.
You can use this module to
create, modify, and rearrange tabs in the browser.
</p>
<img src="{{static}}/images/tabs.png"
width="323" height="50" alt="Two tabs in a window" />
<h2 id="manifest">Manifest</h2>
<p>
Almost all <code>chrome.tabs</code> methods require you to
declare the "tabs" permission
in the <a href="manifest.html">extension manifest</a>.
For example:
</p>
<pre>{
"name": "My extension",
...
<b>"permissions": [
"tabs"
]</b>,
...
}</pre>
<p>
Three methods ($ref:tabs.create,
$ref:tabs.update and
$ref:tabs.remove) and one event
($ref:tabs.onRemoved) don't require the "tabs"
permission.
</p>
<h2 id="examples"> Examples </h2>
<p>
You can find simple examples of using the tabs module in the
<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/">examples/api/tabs</a>
directory.
For other examples and for help in viewing the source code, see
<a href="samples.html">Samples</a>.
</p>
|