blob: 62f3f4747095841c60e016ca3c99bf05a3077bb0 [file] [log] [blame]
<h2 id="manifest">Manifest</h2>
<p>
You can use most <code>chrome.tabs</code> methods and events without declaring
any permissions in the extension's <a href="manifest">manifest</a> file.
However, if you require access to the
<code>$(ref:tabs.Tab.url url)</code>,
<code>$(ref:tabs.Tab.title title)</code>, or
<code>$(ref:tabs.Tab.favIconUrl favIconUrl)</code> properties of
<code>$(ref:tabs.Tab)</code>,
you must declare the <code>"tabs"</code> permission in the manifest,
as shown below:
</p>
<pre data-filename="manifest.json">
{
"name": "My extension",
...
<b>"permissions": [
"tabs"
]</b>,
...
}
</pre>
<h2 id="examples"> Examples </h2>
<p>
<img src="{{static}}/images/tabs.png"
width="561" height="130" alt="Two tabs in a window" />
<br>
You can find simple examples of manipulating tabs with the
<code>chrome.tabs</code> API 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">Samples</a>.
</p>