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