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