Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / common / extensions / docs / templates / intros / tabs.html
blob8e3939d15cc7a64b9ee0e1cff9f391de53369c62
1 <h2 id="manifest">Manifest</h2>
3 <p>
4 You can use most <code>chrome.tabs</code> methods and events without declaring
5 any permissions in the extension's <a href="manifest.html">manifest</a> file.
6 However, if you require access to the
7 <code>$ref:[tabs.Tab.url url]</code>,
8 <code>$ref:[tabs.Tab.title title]</code>, or
9 <code>$ref:[tabs.Tab.favIconUrl favIconUrl]</code> properties of
10 <code>$ref:tabs.Tab</code>,
11 you must declare the <code>"tabs"</code> permission in the manifest,
12 as shown below:
13 </p>
15 <pre data-filename="manifest.json">
17 "name": "My extension",
18 ...
19 <b>"permissions": [
20 "tabs"
21 ]</b>,
22 ...
24 </pre>
26 <h2 id="examples"> Examples </h2>
28 <p>
29 <img src="{{static}}/images/tabs.png"
30 width="561" height="130" alt="Two tabs in a window" />
31 <br>
32 You can find simple examples of manipulating tabs with the
33 <code>chrome.tabs</code> API in the
34 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/tabs/">examples/api/tabs</a>
35 directory.
36 For other examples and for help in viewing the source code, see
37 <a href="samples.html">Samples</a>.
38 </p>