OLD | NEW |
1 <div id="pageData-name" class="pageData">Tabs</div> | 1 <div id="pageData-name" class="pageData">Tabs</div> |
2 | 2 |
3 <!-- BEGIN AUTHORED CONTENT --> | 3 <!-- BEGIN AUTHORED CONTENT --> |
4 <p id="classSummary"> | 4 <p id="classSummary"> |
5 Use the <code>chrome.tabs</code> module | 5 Use the <code>chrome.tabs</code> module |
6 to interact with the browser's tab system. | 6 to interact with the browser's tab system. |
7 You can use this module to | 7 You can use this module to |
8 create, modify, and rearrange tabs in the browser. | 8 create, modify, and rearrange tabs in the browser. |
9 </p> | 9 </p> |
10 | 10 |
11 <img src="images/tabs.png" | 11 <img src="images/tabs.png" |
12 width="323" height="50" alt="Two tabs in a window" /> | 12 width="323" height="50" alt="Two tabs in a window" /> |
13 | 13 |
14 <h2 id="manifest">Manifest</h2> | 14 <h2 id="manifest">Manifest</h2> |
15 <p>All but two functions* require you to declare the "tabs" permission in your e
xtension's manifest to use the tabs API. | 15 <p> |
| 16 Almost all <code>chrome.tabs</code> methods require you to |
| 17 declare the "tabs" permission |
| 18 in the <a href="manifest.html">extension manifest</a>. |
16 For example: | 19 For example: |
17 </p> | 20 </p> |
18 | 21 |
19 <pre>{ | 22 <pre>{ |
20 "name": "My extension", | 23 "name": "My extension", |
21 ... | 24 ... |
22 <b>"permissions": [ | 25 <b>"permissions": [ |
23 "tabs" | 26 "tabs" |
24 ]</b>, | 27 ]</b>, |
25 ... | 28 ... |
26 }</pre> | 29 }</pre> |
27 | 30 |
28 <p>* The two functions that do not require the "tabs" permission are: tabs.creat
e and tabs.update</p> | 31 <p> |
| 32 The two methods that don't require the "tabs" permission are |
| 33 <a href="#method-create"><code>create</code></a> and |
| 34 <a href="#method-update"><code>update</code></a>. |
| 35 </p> |
| 36 |
| 37 |
29 <h2 id="examples"> Examples </h2> | 38 <h2 id="examples"> Examples </h2> |
30 | 39 |
31 <p> | 40 <p> |
32 You can find simple examples of using the tabs module in the | 41 You can find simple examples of using the tabs module in the |
33 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/tabs/">examples/api/tabs</a> | 42 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/tabs/">examples/api/tabs</a> |
34 directory. | 43 directory. |
35 For other examples and for help in viewing the source code, see | 44 For other examples and for help in viewing the source code, see |
36 <a href="samples.html">Samples</a>. | 45 <a href="samples.html">Samples</a>. |
37 </p> | 46 </p> |
38 | 47 |
39 <!-- END AUTHORED CONTENT --> | 48 <!-- END AUTHORED CONTENT --> |
OLD | NEW |