browserAction.html revision 3f50c38dc070f4bb515c1b64450dae14f316474e
1<!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc. Note:
2    1) The <head> information in this page is significant, should be uniform
3       across api docs and should be edited only with knowledge of the
4       templating mechanism.
5    3) All <body>.innerHTML is genereated as an rendering step. If viewed in a
6       browser, it will be re-generated from the template, json schema and
7       authored overview content.
8    4) The <body>.innerHTML is also generated by an offline step so that this
9       page may easily be indexed by search engines.
10--><html xmlns="http://www.w3.org/1999/xhtml"><head>
11    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
12    <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css">
13    <link href="css/print.css" rel="stylesheet" type="text/css" media="print">
14    <script type="text/javascript" src="/third_party/jstemplate/jstemplate_compiled.js">
15    </script>
16    <script type="text/javascript" src="js/api_page_generator.js"></script>
17    <script type="text/javascript" src="js/bootstrap.js"></script>
18    <script type="text/javascript" src="js/sidebar.js"></script>
19  <title>Browser Actions - Google Chrome Extensions - Google Code</title></head>
20  <body>  <div id="gc-container" class="labs">
21      <div id="devModeWarning">
22        You are viewing extension docs in chrome via the 'file:' scheme: are you expecting to see local changes when you refresh? You'll need run chrome with --allow-file-access-from-files.
23      </div>
24      <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
25      <!-- In particular, sub-templates that recurse, must be used by allowing
26           jstemplate to make a copy of the template in this section which
27           are not operated on by way of the jsskip="true" -->
28      <div style="display:none">
29
30        <!-- VALUE -->
31        <div id="valueTemplate">
32          <dt>
33            <var>paramName</var>
34              <em>
35
36                <!-- TYPE -->
37                <div style="display:inline">
38                  (
39                    <span class="optional">optional</span>
40                    <span class="enum">enumerated</span>
41                    <span id="typeTemplate">
42                      <span>
43                        <a> Type</a>
44                      </span>
45                      <span>
46                        <span>
47                          array of <span><span></span></span>
48                        </span>
49                        <span>paramType</span>
50                        <span></span>
51                      </span>
52                    </span>
53                  )
54                </div>
55
56              </em>
57          </dt>
58          <dd class="todo">
59            Undocumented.
60          </dd>
61          <dd>
62            Description of this parameter from the json schema.
63          </dd>
64          <dd>
65            This parameter was added in version
66            <b><span></span></b>.
67            You must omit this parameter in earlier versions,
68            and you may omit it in any version.  If you require this
69            parameter, the manifest key
70            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
71            can ensure that your extension won't be run in an earlier browser version.
72          </dd>
73
74          <!-- OBJECT PROPERTIES -->
75          <dd>
76            <dl>
77              <div>
78                <div>
79                </div>
80              </div>
81            </dl>
82          </dd>
83
84          <!-- FUNCTION PARAMETERS -->
85          <dd>
86            <div></div>
87          </dd>
88
89        </div> <!-- /VALUE -->
90
91        <div id="functionParametersTemplate">
92          <h5>Parameters</h5>
93          <dl>
94            <div>
95              <div>
96              </div>
97            </div>
98          </dl>
99        </div>
100      </div> <!-- /SUBTEMPLATES -->
101
102  <a id="top"></a>
103    <div id="skipto">
104      <a href="#gc-pagecontent">Skip to page content</a>
105      <a href="#gc-toc">Skip to main navigation</a>
106    </div>
107    <!-- API HEADER -->
108    <table id="header" width="100%" cellspacing="0" border="0">
109      <tbody><tr>
110        <td valign="middle"><a href="http://code.google.com/"><img src="images/code_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:0; margin:0;"></a></td>
111        <td valign="middle" width="100%" style="padding-left:0.6em;">
112          <form action="http://www.google.com/cse" id="cse" style="margin-top:0.5em">
113            <div id="gsc-search-box">
114              <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno">
115              <input type="hidden" name="ie" value="UTF-8">
116              <input type="text" name="q" value="" size="55">
117              <input class="gsc-search-button" type="submit" name="sa" value="Search">
118              <br>
119              <span class="greytext">e.g. "page action" or "tabs"</span>
120            </div>
121          </form>
122
123          <script type="text/javascript" src="http://www.google.com/jsapi"></script>
124          <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
125          <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse&t13n_langs=en"></script>
126          <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse&lang=en"></script>
127        </td>
128      </tr>
129    </tbody></table>
130
131    <div id="codesiteContent" class="">
132
133      <a id="gc-topnav-anchor"></a>
134      <div id="gc-topnav">
135        <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Labs</a>)</h1>
136        <ul id="home" class="gc-topnav-tabs">
137          <li id="home_link">
138            <a href="index.html" title="Google Chrome Extensions home page">Home</a>
139          </li>
140          <li id="docs_link">
141            <a href="docs.html" title="Official Google Chrome Extensions documentation">Docs</a>
142          </li>
143          <li id="faq_link">
144            <a href="faq.html" title="Answers to frequently asked questions about Google Chrome Extensions">FAQ</a>
145          </li>
146          <li id="samples_link">
147            <a href="samples.html" title="Sample extensions (with source code)">Samples</a>
148          </li>
149          <li id="group_link">
150            <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions" title="Google Chrome Extensions developer forum">Group</a>
151          </li>
152        </ul>
153      </div> <!-- end gc-topnav -->
154
155    <div class="g-section g-tpl-170">
156      <!-- SIDENAV -->
157      <div class="g-unit g-first" id="gc-toc">
158        <ul>
159          <li><a href="getstarted.html">Getting Started</a></li>
160          <li><a href="overview.html">Overview</a></li>
161          <li><a href="whats_new.html">What's New?</a></li>
162          <li><h2><a href="devguide.html">Developer's Guide</a></h2>
163            <ul>
164              <li>Browser UI
165                <ul>
166                  <li class="leftNavSelected">Browser Actions</li>
167                  <li><a href="contextMenus.html">Context Menus</a></li>
168                  <li><a href="notifications.html">Desktop Notifications</a></li>
169                  <li><a href="omnibox.html">Omnibox</a></li>
170                  <li><a href="options.html">Options Pages</a></li>
171                  <li><a href="override.html">Override Pages</a></li>
172                  <li><a href="pageAction.html">Page Actions</a></li>
173                </ul>
174              </li>
175              <li>Browser Interaction
176                <ul>
177                  <li><a href="bookmarks.html">Bookmarks</a></li>
178                  <li><a href="cookies.html">Cookies</a></li>
179                  <li><a href="events.html">Events</a></li>
180                  <li><a href="history.html">History</a></li>
181                  <li><a href="management.html">Management</a></li>
182                  <li><a href="tabs.html">Tabs</a></li>
183                  <li><a href="windows.html">Windows</a></li>
184                </ul>
185              </li>
186              <li>Implementation
187                <ul>
188                  <li><a href="a11y.html">Accessibility</a></li>
189                  <li><a href="background_pages.html">Background Pages</a></li>
190                  <li><a href="content_scripts.html">Content Scripts</a></li>
191                  <li><a href="xhr.html">Cross-Origin XHR</a></li>
192                  <li><a href="idle.html">Idle</a></li>
193                  <li><a href="i18n.html">Internationalization</a></li>
194                  <li><a href="messaging.html">Message Passing</a></li>
195                  <li><a href="npapi.html">NPAPI Plugins</a></li>
196                </ul>
197              </li>
198              <li>Finishing
199                <ul>
200                  <li><a href="hosting.html">Hosting</a></li>
201                  <li><a href="external_extensions.html">Other Deployment Options</a></li>
202                </ul>
203              </li>
204            </ul>
205          </li>
206          <li><h2><a href="apps.html">Packaged Apps</a></h2></li>
207          <li><h2><a href="tutorials.html">Tutorials</a></h2>
208            <ul>
209              <li><a href="tut_debugging.html">Debugging</a></li>
210              <li><a href="tut_analytics.html">Google Analytics</a></li>
211              <li><a href="tut_oauth.html">OAuth</a></li>
212            </ul>
213          </li>
214          <li><h2>Reference</h2>
215            <ul>
216              <li>Formats
217                <ul>
218                  <li><a href="manifest.html">Manifest Files</a></li>
219                  <li><a href="match_patterns.html">Match Patterns</a></li>
220                </ul>
221              </li>
222              <li><a href="permission_warnings.html">Permission Warnings</a></li>
223              <li><a href="api_index.html">chrome.* APIs</a></li>
224              <li><a href="api_other.html">Other APIs</a></li>
225            </ul>
226          </li>
227          <li><h2><a href="samples.html">Samples</a></h2></li>
228          <div class="line"> </div>
229          <li><h2>More</h2>
230            <ul>
231              <li><a href="http://code.google.com/chrome/webstore/docs/index.html">Chrome Web Store</a></li>
232              <li><a href="http://code.google.com/chrome/apps/docs/developers_guide.html">Hosted Apps</a></li>
233              <li><a href="themes.html">Themes</a></li>
234            </ul>
235          </li>
236        </ul>
237      </div>
238      <script>
239        initToggles();
240      </script>
241
242    <div class="g-unit" id="gc-pagecontent">
243      <div id="pageTitle">
244        <h1 class="page_title">Browser Actions</h1>
245      </div>
246        <!-- TABLE OF CONTENTS -->
247        <div id="toc">
248          <h2>Contents</h2>
249          <ol>
250            <li>
251              <a href="#manifest">Manifest</a>
252              <ol>
253                <li style="display: none; ">
254                  <a>h3Name</a>
255                </li>
256              </ol>
257            </li><li>
258              <a href="#ui">Parts of the UI</a>
259              <ol>
260                <li>
261                  <a href="#icon">Icon</a>
262                </li><li>
263                  <a href="#tooltip">Tooltip</a>
264                </li><li>
265                  <a href="#badge">Badge</a>
266                </li><li>
267                  <a href="#popups">Popup</a>
268                </li>
269              </ol>
270            </li><li>
271              <a href="#H2-6">Tips</a>
272              <ol>
273                <li style="display: none; ">
274                  <a>h3Name</a>
275                </li>
276              </ol>
277            </li><li>
278              <a href="#examples"> Examples </a>
279              <ol>
280                <li style="display: none; ">
281                  <a>h3Name</a>
282                </li>
283              </ol>
284            </li>
285              <li>
286                <a href="#apiReference">API reference: chrome.browserAction</a>
287                <ol>
288                  <li style="display: none; ">
289                    <a href="#properties">Properties</a>
290                    <ol>
291                      <li>
292                        <a href="#property-anchor">propertyName</a>
293                      </li>
294                    </ol>
295                  </li>
296                  <li>
297                    <a href="#methods">Methods</a>
298                    <ol>
299                      <li>
300                        <a href="#method-setBadgeBackgroundColor">setBadgeBackgroundColor</a>
301                      </li><li>
302                        <a href="#method-setBadgeText">setBadgeText</a>
303                      </li><li>
304                        <a href="#method-setIcon">setIcon</a>
305                      </li><li>
306                        <a href="#method-setPopup">setPopup</a>
307                      </li><li>
308                        <a href="#method-setTitle">setTitle</a>
309                      </li>
310                    </ol>
311                  </li>
312                  <li>
313                    <a href="#events">Events</a>
314                    <ol>
315                      <li>
316                        <a href="#event-onClicked">onClicked</a>
317                      </li>
318                    </ol>
319                  </li>
320                  <li style="display: none; ">
321                    <a href="#types">Types</a>
322                    <ol>
323                      <li>
324                        <a href="#id-anchor">id</a>
325                      </li>
326                    </ol>
327                  </li>
328                </ol>
329              </li>
330          </ol>
331        </div>
332        <!-- /TABLE OF CONTENTS -->
333
334        <!-- Standard content lead-in for experimental API pages -->
335        <p id="classSummary" style="display: none; ">
336          For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
337        </p>
338
339        <!-- STATIC CONTENT PLACEHOLDER -->
340        <div id="static"><div id="pageData-name" class="pageData">Browser Actions</div>
341
342<!-- BEGIN AUTHORED CONTENT -->
343<p>Use browser actions to put icons
344  in the main Google Chrome toolbar,
345  to the right of the address bar.
346  In addition to its <a href="#icon">icon</a>,
347  a browser action can also have
348  a <a href="#tooltip">tooltip</a>,
349  a <a href="#badge">badge</a>,
350  and a <a href="#popups">popup</a>.
351  </p>
352
353<p>
354In the following figure,
355the multicolored square
356to the right of the address bar
357is the icon for a browser action.
358A popup is below the icon.
359</p>
360
361<img src="images/browser-action.png" width="363" height="226">
362
363<p>
364If you want to create an icon that isn't always visible,
365use a <a href="pageAction.html">page action</a>
366instead of a browser action.
367</p>
368
369<p class="caution">
370<strong>Note:</strong>
371Packaged apps cannot use browser actions.
372</p>
373
374<!-- [PENDING: We should show tooltips and badges, as well.] -->
375
376<h2 id="manifest">Manifest</h2>
377
378<p>
379Register your browser action in the
380<a href="manifest.html">extension manifest</a>
381like this:
382</p>
383
384<pre>{
385  "name": "My extension",
386  ...
387  <b>"browser_action": {
388    "default_icon": "images/icon19.png", <em>// <b>required</b></em>
389    "default_title": "Google Mail",      <em>// optional; shown in tooltip</em>
390    "default_popup": "popup.html"        <em>// optional</em>
391  }</b>,
392  ...
393}</pre>
394
395<h2 id="ui">Parts of the UI</h2>
396
397<p>
398A browser action must have an <a href="#icon">icon</a>.
399It can also have
400a <a href="#tooltip">tooltip</a>,
401a <a href="#badge">badge</a>,
402and a <a href="#popups">popup</a>.
403</p>
404
405<h3 id="icon">Icon</h3>
406
407<p>Browser action icons can be up to 19 pixels wide and high.
408  Larger icons are resized to fit, but for best results,
409  use a 19-pixel square icon.</p>
410
411<p>You can set the icon in two ways:
412  using a static image or using the
413  HTML5 <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html">canvas element</a>.
414  Using static images is easier for simple applications,
415  but you can create more dynamic UIs —
416  such as smooth animation —
417  using the canvas element.
418  </p>
419
420<p>Static images can be in any format WebKit can display,
421  including BMP, GIF, ICO, JPEG, or PNG.
422  </p>
423
424<p>To set the icon,
425use the <b>default_icon</b> field of <b>browser_action</b>
426in the <a href="#manifest">manifest</a>,
427or call the <a href="#method-setIcon">setIcon()</a> method.
428
429
430</p><h3 id="tooltip">Tooltip</h3>
431
432<p>
433To set the tooltip,
434use the <b>default_title</b> field of <b>browser_action</b>
435in the <a href="#manifest">manifest</a>,
436or call the <a href="#method-setTitle">setTitle()</a> method.
437You can specify locale-specific strings for the <b>default_title</b> field;
438see <a href="i18n.html">Internationalization</a> for details.
439</p>
440
441<h3 id="badge">Badge</h3>
442
443<p>Browser actions can optionally display a <em>badge</em> —
444  a bit of text that is layered over the icon.
445  Badges make it easy to update the browser action
446  to display a small amount of information
447  about the state of the extension.</p>
448
449<p>Because the badge has limited space,
450   it should have 4 characters or less.
451  </p>
452
453<p>
454Set the text and color of the badge using
455<a href="#method-setBadgeText">setBadgeText()</a> and
456<a href="#method-setBadgeBackgroundColor">setBadgeBackgroundColor()</a>,
457respectively.
458<!-- [PENDING: if you have a color but no text, will anything display?] -->
459</p>
460
461
462<h3 id="popups">Popup</h3>
463
464<p>If a browser action has a popup,
465  the popup appears when the user clicks the icon.
466  The popup can contain any HTML contents that you like,
467  and it's automatically sized to fit its contents.
468  </p>
469
470<p>
471To add a popup to your browser action,
472create an HTML file with the popup's contents.
473Specify the HTML file in the <b>default_popup</b> field of <b>browser_action</b>
474in the <a href="#manifest">manifest</a>, or call the
475<a href="#method-setPopup">setPopup()</a> method.
476</p>
477
478<a name="H2-6"></a><h2>Tips</h2>
479
480<p>For the best visual impact,
481  follow these guidelines:</p>
482
483<ul>
484  <li><b>Do</b> use browser actions for features
485    that make sense on most pages.
486  </li><li><b>Don't</b> use browser actions for features
487    that make sense for only a few pages.
488    Use <a href="pageAction.html">page actions</a> instead.
489  </li><li><b>Do</b> use big, colorful icons that make the most of
490    the 19x19-pixel space.
491    Browser action icons should seem a little bigger
492    and heavier than page action icons.
493  </li><li><b>Don't</b> attempt to mimic
494    Google Chrome's monochrome "wrench" icon.
495    That doesn't work well with themes, and anyway,
496    extensions should stand out a little.
497  </li><li><b>Do</b> use alpha transparency
498    to add soft edges to your icon.
499    Because many people use themes,
500    your icon should look nice
501    on a variety of background colors.
502  </li><li><b>Don't</b> constantly animate your icon.
503    That's just annoying.
504</li></ul>
505
506<h2 id="examples"> Examples </h2>
507
508<p>
509You can find simple examples of using browser actions in the
510<a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/api/browserAction/">examples/api/browserAction</a>
511directory.
512For other examples and for help in viewing the source code, see
513<a href="samples.html">Samples</a>.
514</p>
515
516<!-- END AUTHORED CONTENT -->
517</div>
518
519        <!-- API PAGE -->
520        <div class="apiPage">
521        <a name="apiReference"></a>
522        <h2>API reference: chrome.browserAction</h2>
523
524          <!-- PROPERTIES -->
525          <div class="apiGroup" style="display: none; ">
526            <a name="properties"></a>
527            <h3 id="properties">Properties</h3>
528
529            <div>
530              <a></a>
531              <h4>getLastError</h4>
532              <div class="summary">
533                <!-- Note: intentionally longer 80 columns -->
534                <span>chrome.extension</span><span>lastError</span>
535              </div>
536              <div>
537              </div>
538            </div>
539
540          </div> <!-- /apiGroup -->
541
542          <!-- METHODS -->
543          <div class="apiGroup" id="methods">
544            <a name="methods"></a>
545            <h3>Methods</h3>
546
547            <!-- iterates over all functions -->
548            <div class="apiItem">
549              <a name="method-setBadgeBackgroundColor"></a> <!-- method-anchor -->
550              <h4>setBadgeBackgroundColor</h4>
551
552              <div class="summary"><span style="display: none; ">void</span>
553                  <!-- Note: intentionally longer 80 columns -->
554                  <span>chrome.browserAction.setBadgeBackgroundColor</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
555                      <var><span>details</span></var></span>)</div>
556
557              <div class="description">
558                <p class="todo" style="display: none; ">Undocumented.</p>
559                <p>Sets the background color for the badge.</p>
560
561                <!-- PARAMETERS -->
562                <h4>Parameters</h4>
563                <dl>
564                  <div>
565                    <div>
566          <dt>
567            <var>details</var>
568              <em>
569
570                <!-- TYPE -->
571                <div style="display:inline">
572                  (
573                    <span class="optional" style="display: none; ">optional</span>
574                    <span class="enum" style="display: none; ">enumerated</span>
575                    <span id="typeTemplate">
576                      <span style="display: none; ">
577                        <a> Type</a>
578                      </span>
579                      <span>
580                        <span style="display: none; ">
581                          array of <span><span></span></span>
582                        </span>
583                        <span>object</span>
584                        <span style="display: none; "></span>
585                      </span>
586                    </span>
587                  )
588                </div>
589
590              </em>
591          </dt>
592          <dd class="todo">
593            Undocumented.
594          </dd>
595          <dd style="display: none; ">
596            Description of this parameter from the json schema.
597          </dd>
598          <dd style="display: none; ">
599            This parameter was added in version
600            <b><span></span></b>.
601            You must omit this parameter in earlier versions,
602            and you may omit it in any version.  If you require this
603            parameter, the manifest key
604            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
605            can ensure that your extension won't be run in an earlier browser version.
606          </dd>
607
608          <!-- OBJECT PROPERTIES -->
609          <dd>
610            <dl>
611              <div>
612                <div>
613          <dt>
614            <var>color</var>
615              <em>
616
617                <!-- TYPE -->
618                <div style="display:inline">
619                  (
620                    <span class="optional" style="display: none; ">optional</span>
621                    <span class="enum" style="display: none; ">enumerated</span>
622                    <span id="typeTemplate">
623                      <span style="display: none; ">
624                        <a> Type</a>
625                      </span>
626                      <span>
627                        <span>
628                          array of <span><span>
629                      <span style="display: none; ">
630                        <a> Type</a>
631                      </span>
632                      <span>
633                        <span style="display: none; ">
634                          array of <span><span></span></span>
635                        </span>
636                        <span>integer</span>
637                        <span style="display: none; "></span>
638                      </span>
639                    </span></span>
640                        </span>
641                        <span style="display: none; ">paramType</span>
642                        <span style="display: none; "></span>
643                      </span>
644                    </span>
645                  )
646                </div>
647
648              </em>
649          </dt>
650          <dd class="todo" style="display: none; ">
651            Undocumented.
652          </dd>
653          <dd>An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>.</dd>
654          <dd style="display: none; ">
655            This parameter was added in version
656            <b><span></span></b>.
657            You must omit this parameter in earlier versions,
658            and you may omit it in any version.  If you require this
659            parameter, the manifest key
660            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
661            can ensure that your extension won't be run in an earlier browser version.
662          </dd>
663
664          <!-- OBJECT PROPERTIES -->
665          <dd style="display: none; ">
666            <dl>
667              <div>
668                <div>
669                </div>
670              </div>
671            </dl>
672          </dd>
673
674          <!-- FUNCTION PARAMETERS -->
675          <dd style="display: none; ">
676            <div></div>
677          </dd>
678
679        </div>
680              </div><div>
681                <div>
682          <dt>
683            <var>tabId</var>
684              <em>
685
686                <!-- TYPE -->
687                <div style="display:inline">
688                  (
689                    <span class="optional">optional</span>
690                    <span class="enum" style="display: none; ">enumerated</span>
691                    <span id="typeTemplate">
692                      <span style="display: none; ">
693                        <a> Type</a>
694                      </span>
695                      <span>
696                        <span style="display: none; ">
697                          array of <span><span></span></span>
698                        </span>
699                        <span>integer</span>
700                        <span style="display: none; "></span>
701                      </span>
702                    </span>
703                  )
704                </div>
705
706              </em>
707          </dt>
708          <dd class="todo" style="display: none; ">
709            Undocumented.
710          </dd>
711          <dd>Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.</dd>
712          <dd style="display: none; ">
713            This parameter was added in version
714            <b><span></span></b>.
715            You must omit this parameter in earlier versions,
716            and you may omit it in any version.  If you require this
717            parameter, the manifest key
718            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
719            can ensure that your extension won't be run in an earlier browser version.
720          </dd>
721
722          <!-- OBJECT PROPERTIES -->
723          <dd style="display: none; ">
724            <dl>
725              <div>
726                <div>
727                </div>
728              </div>
729            </dl>
730          </dd>
731
732          <!-- FUNCTION PARAMETERS -->
733          <dd style="display: none; ">
734            <div></div>
735          </dd>
736
737        </div>
738              </div>
739            </dl>
740          </dd>
741
742          <!-- FUNCTION PARAMETERS -->
743          <dd style="display: none; ">
744            <div></div>
745          </dd>
746
747        </div>
748                  </div>
749                </dl>
750
751                <!-- RETURNS -->
752                <h4 style="display: none; ">Returns</h4>
753                <dl>
754                  <div style="display: none; ">
755                    <div>
756                    </div>
757                  </div>
758                </dl>
759
760                <!-- CALLBACK -->
761                <div style="display: none; ">
762                  <div>
763                  <h4>Callback function</h4>
764                  <p>
765                    The callback <em>parameter</em> should specify a function
766                    that looks like this:
767                  </p>
768                  <p>
769                    If you specify the <em>callback</em> parameter, it should
770                    specify a function that looks like this:
771                  </p>
772
773                  <!-- Note: intentionally longer 80 columns -->
774                  <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
775                  <dl>
776                    <div>
777                      <div>
778                      </div>
779                    </div>
780                  </dl>
781                  </div>
782                </div>
783
784                <!-- MIN_VERSION -->
785                <p style="display: none; ">
786                  This function was added in version <b><span></span></b>.
787                  If you require this function, the manifest key
788                  <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
789                  can ensure that your extension won't be run in an earlier browser version.
790                </p>
791              </div> <!-- /description -->
792
793            </div><div class="apiItem">
794              <a name="method-setBadgeText"></a> <!-- method-anchor -->
795              <h4>setBadgeText</h4>
796
797              <div class="summary"><span style="display: none; ">void</span>
798                  <!-- Note: intentionally longer 80 columns -->
799                  <span>chrome.browserAction.setBadgeText</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
800                      <var><span>details</span></var></span>)</div>
801
802              <div class="description">
803                <p class="todo" style="display: none; ">Undocumented.</p>
804                <p>Sets the badge text for the browser action. The badge is displayed on top of the icon.</p>
805
806                <!-- PARAMETERS -->
807                <h4>Parameters</h4>
808                <dl>
809                  <div>
810                    <div>
811          <dt>
812            <var>details</var>
813              <em>
814
815                <!-- TYPE -->
816                <div style="display:inline">
817                  (
818                    <span class="optional" style="display: none; ">optional</span>
819                    <span class="enum" style="display: none; ">enumerated</span>
820                    <span id="typeTemplate">
821                      <span style="display: none; ">
822                        <a> Type</a>
823                      </span>
824                      <span>
825                        <span style="display: none; ">
826                          array of <span><span></span></span>
827                        </span>
828                        <span>object</span>
829                        <span style="display: none; "></span>
830                      </span>
831                    </span>
832                  )
833                </div>
834
835              </em>
836          </dt>
837          <dd class="todo">
838            Undocumented.
839          </dd>
840          <dd style="display: none; ">
841            Description of this parameter from the json schema.
842          </dd>
843          <dd style="display: none; ">
844            This parameter was added in version
845            <b><span></span></b>.
846            You must omit this parameter in earlier versions,
847            and you may omit it in any version.  If you require this
848            parameter, the manifest key
849            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
850            can ensure that your extension won't be run in an earlier browser version.
851          </dd>
852
853          <!-- OBJECT PROPERTIES -->
854          <dd>
855            <dl>
856              <div>
857                <div>
858          <dt>
859            <var>text</var>
860              <em>
861
862                <!-- TYPE -->
863                <div style="display:inline">
864                  (
865                    <span class="optional" style="display: none; ">optional</span>
866                    <span class="enum" style="display: none; ">enumerated</span>
867                    <span id="typeTemplate">
868                      <span style="display: none; ">
869                        <a> Type</a>
870                      </span>
871                      <span>
872                        <span style="display: none; ">
873                          array of <span><span></span></span>
874                        </span>
875                        <span>string</span>
876                        <span style="display: none; "></span>
877                      </span>
878                    </span>
879                  )
880                </div>
881
882              </em>
883          </dt>
884          <dd class="todo" style="display: none; ">
885            Undocumented.
886          </dd>
887          <dd>Any number of characters can be passed, but only about four can fit in the space.</dd>
888          <dd style="display: none; ">
889            This parameter was added in version
890            <b><span></span></b>.
891            You must omit this parameter in earlier versions,
892            and you may omit it in any version.  If you require this
893            parameter, the manifest key
894            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
895            can ensure that your extension won't be run in an earlier browser version.
896          </dd>
897
898          <!-- OBJECT PROPERTIES -->
899          <dd style="display: none; ">
900            <dl>
901              <div>
902                <div>
903                </div>
904              </div>
905            </dl>
906          </dd>
907
908          <!-- FUNCTION PARAMETERS -->
909          <dd style="display: none; ">
910            <div></div>
911          </dd>
912
913        </div>
914              </div><div>
915                <div>
916          <dt>
917            <var>tabId</var>
918              <em>
919
920                <!-- TYPE -->
921                <div style="display:inline">
922                  (
923                    <span class="optional">optional</span>
924                    <span class="enum" style="display: none; ">enumerated</span>
925                    <span id="typeTemplate">
926                      <span style="display: none; ">
927                        <a> Type</a>
928                      </span>
929                      <span>
930                        <span style="display: none; ">
931                          array of <span><span></span></span>
932                        </span>
933                        <span>integer</span>
934                        <span style="display: none; "></span>
935                      </span>
936                    </span>
937                  )
938                </div>
939
940              </em>
941          </dt>
942          <dd class="todo" style="display: none; ">
943            Undocumented.
944          </dd>
945          <dd>Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.</dd>
946          <dd style="display: none; ">
947            This parameter was added in version
948            <b><span></span></b>.
949            You must omit this parameter in earlier versions,
950            and you may omit it in any version.  If you require this
951            parameter, the manifest key
952            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
953            can ensure that your extension won't be run in an earlier browser version.
954          </dd>
955
956          <!-- OBJECT PROPERTIES -->
957          <dd style="display: none; ">
958            <dl>
959              <div>
960                <div>
961                </div>
962              </div>
963            </dl>
964          </dd>
965
966          <!-- FUNCTION PARAMETERS -->
967          <dd style="display: none; ">
968            <div></div>
969          </dd>
970
971        </div>
972              </div>
973            </dl>
974          </dd>
975
976          <!-- FUNCTION PARAMETERS -->
977          <dd style="display: none; ">
978            <div></div>
979          </dd>
980
981        </div>
982                  </div>
983                </dl>
984
985                <!-- RETURNS -->
986                <h4 style="display: none; ">Returns</h4>
987                <dl>
988                  <div style="display: none; ">
989                    <div>
990                    </div>
991                  </div>
992                </dl>
993
994                <!-- CALLBACK -->
995                <div style="display: none; ">
996                  <div>
997                  <h4>Callback function</h4>
998                  <p>
999                    The callback <em>parameter</em> should specify a function
1000                    that looks like this:
1001                  </p>
1002                  <p>
1003                    If you specify the <em>callback</em> parameter, it should
1004                    specify a function that looks like this:
1005                  </p>
1006
1007                  <!-- Note: intentionally longer 80 columns -->
1008                  <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
1009                  <dl>
1010                    <div>
1011                      <div>
1012                      </div>
1013                    </div>
1014                  </dl>
1015                  </div>
1016                </div>
1017
1018                <!-- MIN_VERSION -->
1019                <p style="display: none; ">
1020                  This function was added in version <b><span></span></b>.
1021                  If you require this function, the manifest key
1022                  <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1023                  can ensure that your extension won't be run in an earlier browser version.
1024                </p>
1025              </div> <!-- /description -->
1026
1027            </div><div class="apiItem">
1028              <a name="method-setIcon"></a> <!-- method-anchor -->
1029              <h4>setIcon</h4>
1030
1031              <div class="summary"><span style="display: none; ">void</span>
1032                  <!-- Note: intentionally longer 80 columns -->
1033                  <span>chrome.browserAction.setIcon</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
1034                      <var><span>details</span></var></span>)</div>
1035
1036              <div class="description">
1037                <p class="todo" style="display: none; ">Undocumented.</p>
1038                <p>Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element. Either the <b>path</b> or the <b>imageData</b> property must be specified.</p>
1039
1040                <!-- PARAMETERS -->
1041                <h4>Parameters</h4>
1042                <dl>
1043                  <div>
1044                    <div>
1045          <dt>
1046            <var>details</var>
1047              <em>
1048
1049                <!-- TYPE -->
1050                <div style="display:inline">
1051                  (
1052                    <span class="optional" style="display: none; ">optional</span>
1053                    <span class="enum" style="display: none; ">enumerated</span>
1054                    <span id="typeTemplate">
1055                      <span style="display: none; ">
1056                        <a> Type</a>
1057                      </span>
1058                      <span>
1059                        <span style="display: none; ">
1060                          array of <span><span></span></span>
1061                        </span>
1062                        <span>object</span>
1063                        <span style="display: none; "></span>
1064                      </span>
1065                    </span>
1066                  )
1067                </div>
1068
1069              </em>
1070          </dt>
1071          <dd class="todo">
1072            Undocumented.
1073          </dd>
1074          <dd style="display: none; ">
1075            Description of this parameter from the json schema.
1076          </dd>
1077          <dd style="display: none; ">
1078            This parameter was added in version
1079            <b><span></span></b>.
1080            You must omit this parameter in earlier versions,
1081            and you may omit it in any version.  If you require this
1082            parameter, the manifest key
1083            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1084            can ensure that your extension won't be run in an earlier browser version.
1085          </dd>
1086
1087          <!-- OBJECT PROPERTIES -->
1088          <dd>
1089            <dl>
1090              <div>
1091                <div>
1092          <dt>
1093            <var>imageData</var>
1094              <em>
1095
1096                <!-- TYPE -->
1097                <div style="display:inline">
1098                  (
1099                    <span class="optional">optional</span>
1100                    <span class="enum" style="display: none; ">enumerated</span>
1101                    <span id="typeTemplate">
1102                      <span style="display: none; ">
1103                        <a> Type</a>
1104                      </span>
1105                      <span>
1106                        <span style="display: none; ">
1107                          array of <span><span></span></span>
1108                        </span>
1109                        <span>ImageData</span>
1110                        <span style="display: none; "></span>
1111                      </span>
1112                    </span>
1113                  )
1114                </div>
1115
1116              </em>
1117          </dt>
1118          <dd class="todo" style="display: none; ">
1119            Undocumented.
1120          </dd>
1121          <dd>Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).</dd>
1122          <dd style="display: none; ">
1123            This parameter was added in version
1124            <b><span></span></b>.
1125            You must omit this parameter in earlier versions,
1126            and you may omit it in any version.  If you require this
1127            parameter, the manifest key
1128            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1129            can ensure that your extension won't be run in an earlier browser version.
1130          </dd>
1131
1132          <!-- OBJECT PROPERTIES -->
1133          <dd>
1134            <dl>
1135              <div style="display: none; ">
1136                <div>
1137                </div>
1138              </div>
1139            </dl>
1140          </dd>
1141
1142          <!-- FUNCTION PARAMETERS -->
1143          <dd style="display: none; ">
1144            <div></div>
1145          </dd>
1146
1147        </div>
1148              </div><div>
1149                <div>
1150          <dt>
1151            <var>path</var>
1152              <em>
1153
1154                <!-- TYPE -->
1155                <div style="display:inline">
1156                  (
1157                    <span class="optional">optional</span>
1158                    <span class="enum" style="display: none; ">enumerated</span>
1159                    <span id="typeTemplate">
1160                      <span style="display: none; ">
1161                        <a> Type</a>
1162                      </span>
1163                      <span>
1164                        <span style="display: none; ">
1165                          array of <span><span></span></span>
1166                        </span>
1167                        <span>string</span>
1168                        <span style="display: none; "></span>
1169                      </span>
1170                    </span>
1171                  )
1172                </div>
1173
1174              </em>
1175          </dt>
1176          <dd class="todo" style="display: none; ">
1177            Undocumented.
1178          </dd>
1179          <dd>Relative path to an image in the extension to show in the browser action.</dd>
1180          <dd style="display: none; ">
1181            This parameter was added in version
1182            <b><span></span></b>.
1183            You must omit this parameter in earlier versions,
1184            and you may omit it in any version.  If you require this
1185            parameter, the manifest key
1186            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1187            can ensure that your extension won't be run in an earlier browser version.
1188          </dd>
1189
1190          <!-- OBJECT PROPERTIES -->
1191          <dd style="display: none; ">
1192            <dl>
1193              <div>
1194                <div>
1195                </div>
1196              </div>
1197            </dl>
1198          </dd>
1199
1200          <!-- FUNCTION PARAMETERS -->
1201          <dd style="display: none; ">
1202            <div></div>
1203          </dd>
1204
1205        </div>
1206              </div><div>
1207                <div>
1208          <dt>
1209            <var>tabId</var>
1210              <em>
1211
1212                <!-- TYPE -->
1213                <div style="display:inline">
1214                  (
1215                    <span class="optional">optional</span>
1216                    <span class="enum" style="display: none; ">enumerated</span>
1217                    <span id="typeTemplate">
1218                      <span style="display: none; ">
1219                        <a> Type</a>
1220                      </span>
1221                      <span>
1222                        <span style="display: none; ">
1223                          array of <span><span></span></span>
1224                        </span>
1225                        <span>integer</span>
1226                        <span style="display: none; "></span>
1227                      </span>
1228                    </span>
1229                  )
1230                </div>
1231
1232              </em>
1233          </dt>
1234          <dd class="todo" style="display: none; ">
1235            Undocumented.
1236          </dd>
1237          <dd>Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.</dd>
1238          <dd style="display: none; ">
1239            This parameter was added in version
1240            <b><span></span></b>.
1241            You must omit this parameter in earlier versions,
1242            and you may omit it in any version.  If you require this
1243            parameter, the manifest key
1244            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1245            can ensure that your extension won't be run in an earlier browser version.
1246          </dd>
1247
1248          <!-- OBJECT PROPERTIES -->
1249          <dd style="display: none; ">
1250            <dl>
1251              <div>
1252                <div>
1253                </div>
1254              </div>
1255            </dl>
1256          </dd>
1257
1258          <!-- FUNCTION PARAMETERS -->
1259          <dd style="display: none; ">
1260            <div></div>
1261          </dd>
1262
1263        </div>
1264              </div>
1265            </dl>
1266          </dd>
1267
1268          <!-- FUNCTION PARAMETERS -->
1269          <dd style="display: none; ">
1270            <div></div>
1271          </dd>
1272
1273        </div>
1274                  </div>
1275                </dl>
1276
1277                <!-- RETURNS -->
1278                <h4 style="display: none; ">Returns</h4>
1279                <dl>
1280                  <div style="display: none; ">
1281                    <div>
1282                    </div>
1283                  </div>
1284                </dl>
1285
1286                <!-- CALLBACK -->
1287                <div style="display: none; ">
1288                  <div>
1289                  <h4>Callback function</h4>
1290                  <p>
1291                    The callback <em>parameter</em> should specify a function
1292                    that looks like this:
1293                  </p>
1294                  <p>
1295                    If you specify the <em>callback</em> parameter, it should
1296                    specify a function that looks like this:
1297                  </p>
1298
1299                  <!-- Note: intentionally longer 80 columns -->
1300                  <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
1301                  <dl>
1302                    <div>
1303                      <div>
1304                      </div>
1305                    </div>
1306                  </dl>
1307                  </div>
1308                </div>
1309
1310                <!-- MIN_VERSION -->
1311                <p style="display: none; ">
1312                  This function was added in version <b><span></span></b>.
1313                  If you require this function, the manifest key
1314                  <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1315                  can ensure that your extension won't be run in an earlier browser version.
1316                </p>
1317              </div> <!-- /description -->
1318
1319            </div><div class="apiItem">
1320              <a name="method-setPopup"></a> <!-- method-anchor -->
1321              <h4>setPopup</h4>
1322
1323              <div class="summary"><span style="display: none; ">void</span>
1324                  <!-- Note: intentionally longer 80 columns -->
1325                  <span>chrome.browserAction.setPopup</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
1326                      <var><span>details</span></var></span>)</div>
1327
1328              <div class="description">
1329                <p class="todo" style="display: none; ">Undocumented.</p>
1330                <p>Sets the html document to be opened as a popup when the user clicks on the browser action's icon.</p>
1331
1332                <!-- PARAMETERS -->
1333                <h4>Parameters</h4>
1334                <dl>
1335                  <div>
1336                    <div>
1337          <dt>
1338            <var>details</var>
1339              <em>
1340
1341                <!-- TYPE -->
1342                <div style="display:inline">
1343                  (
1344                    <span class="optional" style="display: none; ">optional</span>
1345                    <span class="enum" style="display: none; ">enumerated</span>
1346                    <span id="typeTemplate">
1347                      <span style="display: none; ">
1348                        <a> Type</a>
1349                      </span>
1350                      <span>
1351                        <span style="display: none; ">
1352                          array of <span><span></span></span>
1353                        </span>
1354                        <span>object</span>
1355                        <span style="display: none; "></span>
1356                      </span>
1357                    </span>
1358                  )
1359                </div>
1360
1361              </em>
1362          </dt>
1363          <dd class="todo">
1364            Undocumented.
1365          </dd>
1366          <dd style="display: none; ">
1367            Description of this parameter from the json schema.
1368          </dd>
1369          <dd style="display: none; ">
1370            This parameter was added in version
1371            <b><span></span></b>.
1372            You must omit this parameter in earlier versions,
1373            and you may omit it in any version.  If you require this
1374            parameter, the manifest key
1375            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1376            can ensure that your extension won't be run in an earlier browser version.
1377          </dd>
1378
1379          <!-- OBJECT PROPERTIES -->
1380          <dd>
1381            <dl>
1382              <div>
1383                <div>
1384          <dt>
1385            <var>tabId</var>
1386              <em>
1387
1388                <!-- TYPE -->
1389                <div style="display:inline">
1390                  (
1391                    <span class="optional">optional</span>
1392                    <span class="enum" style="display: none; ">enumerated</span>
1393                    <span id="typeTemplate">
1394                      <span style="display: none; ">
1395                        <a> Type</a>
1396                      </span>
1397                      <span>
1398                        <span style="display: none; ">
1399                          array of <span><span></span></span>
1400                        </span>
1401                        <span>integer</span>
1402                        <span style="display: none; "></span>
1403                      </span>
1404                    </span>
1405                  )
1406                </div>
1407
1408              </em>
1409          </dt>
1410          <dd class="todo" style="display: none; ">
1411            Undocumented.
1412          </dd>
1413          <dd>Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.</dd>
1414          <dd style="display: none; ">
1415            This parameter was added in version
1416            <b><span></span></b>.
1417            You must omit this parameter in earlier versions,
1418            and you may omit it in any version.  If you require this
1419            parameter, the manifest key
1420            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1421            can ensure that your extension won't be run in an earlier browser version.
1422          </dd>
1423
1424          <!-- OBJECT PROPERTIES -->
1425          <dd style="display: none; ">
1426            <dl>
1427              <div>
1428                <div>
1429                </div>
1430              </div>
1431            </dl>
1432          </dd>
1433
1434          <!-- FUNCTION PARAMETERS -->
1435          <dd style="display: none; ">
1436            <div></div>
1437          </dd>
1438
1439        </div>
1440              </div><div>
1441                <div>
1442          <dt>
1443            <var>popup</var>
1444              <em>
1445
1446                <!-- TYPE -->
1447                <div style="display:inline">
1448                  (
1449                    <span class="optional" style="display: none; ">optional</span>
1450                    <span class="enum" style="display: none; ">enumerated</span>
1451                    <span id="typeTemplate">
1452                      <span style="display: none; ">
1453                        <a> Type</a>
1454                      </span>
1455                      <span>
1456                        <span style="display: none; ">
1457                          array of <span><span></span></span>
1458                        </span>
1459                        <span>string</span>
1460                        <span style="display: none; "></span>
1461                      </span>
1462                    </span>
1463                  )
1464                </div>
1465
1466              </em>
1467          </dt>
1468          <dd class="todo" style="display: none; ">
1469            Undocumented.
1470          </dd>
1471          <dd>The html file to show in a popup.  If set to the empty string (''), no popup is shown.</dd>
1472          <dd style="display: none; ">
1473            This parameter was added in version
1474            <b><span></span></b>.
1475            You must omit this parameter in earlier versions,
1476            and you may omit it in any version.  If you require this
1477            parameter, the manifest key
1478            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1479            can ensure that your extension won't be run in an earlier browser version.
1480          </dd>
1481
1482          <!-- OBJECT PROPERTIES -->
1483          <dd style="display: none; ">
1484            <dl>
1485              <div>
1486                <div>
1487                </div>
1488              </div>
1489            </dl>
1490          </dd>
1491
1492          <!-- FUNCTION PARAMETERS -->
1493          <dd style="display: none; ">
1494            <div></div>
1495          </dd>
1496
1497        </div>
1498              </div>
1499            </dl>
1500          </dd>
1501
1502          <!-- FUNCTION PARAMETERS -->
1503          <dd style="display: none; ">
1504            <div></div>
1505          </dd>
1506
1507        </div>
1508                  </div>
1509                </dl>
1510
1511                <!-- RETURNS -->
1512                <h4 style="display: none; ">Returns</h4>
1513                <dl>
1514                  <div style="display: none; ">
1515                    <div>
1516                    </div>
1517                  </div>
1518                </dl>
1519
1520                <!-- CALLBACK -->
1521                <div style="display: none; ">
1522                  <div>
1523                  <h4>Callback function</h4>
1524                  <p>
1525                    The callback <em>parameter</em> should specify a function
1526                    that looks like this:
1527                  </p>
1528                  <p>
1529                    If you specify the <em>callback</em> parameter, it should
1530                    specify a function that looks like this:
1531                  </p>
1532
1533                  <!-- Note: intentionally longer 80 columns -->
1534                  <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
1535                  <dl>
1536                    <div>
1537                      <div>
1538                      </div>
1539                    </div>
1540                  </dl>
1541                  </div>
1542                </div>
1543
1544                <!-- MIN_VERSION -->
1545                <p>
1546                  This function was added in version <b><span>5.0.316.0</span></b>.
1547                  If you require this function, the manifest key
1548                  <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1549                  can ensure that your extension won't be run in an earlier browser version.
1550                </p>
1551              </div> <!-- /description -->
1552
1553            </div><div class="apiItem">
1554              <a name="method-setTitle"></a> <!-- method-anchor -->
1555              <h4>setTitle</h4>
1556
1557              <div class="summary"><span style="display: none; ">void</span>
1558                  <!-- Note: intentionally longer 80 columns -->
1559                  <span>chrome.browserAction.setTitle</span>(<span class="null"><span style="display: none; ">, </span><span>object</span>
1560                      <var><span>details</span></var></span>)</div>
1561
1562              <div class="description">
1563                <p class="todo" style="display: none; ">Undocumented.</p>
1564                <p>Sets the title of the browser action. This shows up in the tooltip.</p>
1565
1566                <!-- PARAMETERS -->
1567                <h4>Parameters</h4>
1568                <dl>
1569                  <div>
1570                    <div>
1571          <dt>
1572            <var>details</var>
1573              <em>
1574
1575                <!-- TYPE -->
1576                <div style="display:inline">
1577                  (
1578                    <span class="optional" style="display: none; ">optional</span>
1579                    <span class="enum" style="display: none; ">enumerated</span>
1580                    <span id="typeTemplate">
1581                      <span style="display: none; ">
1582                        <a> Type</a>
1583                      </span>
1584                      <span>
1585                        <span style="display: none; ">
1586                          array of <span><span></span></span>
1587                        </span>
1588                        <span>object</span>
1589                        <span style="display: none; "></span>
1590                      </span>
1591                    </span>
1592                  )
1593                </div>
1594
1595              </em>
1596          </dt>
1597          <dd class="todo">
1598            Undocumented.
1599          </dd>
1600          <dd style="display: none; ">
1601            Description of this parameter from the json schema.
1602          </dd>
1603          <dd style="display: none; ">
1604            This parameter was added in version
1605            <b><span></span></b>.
1606            You must omit this parameter in earlier versions,
1607            and you may omit it in any version.  If you require this
1608            parameter, the manifest key
1609            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1610            can ensure that your extension won't be run in an earlier browser version.
1611          </dd>
1612
1613          <!-- OBJECT PROPERTIES -->
1614          <dd>
1615            <dl>
1616              <div>
1617                <div>
1618          <dt>
1619            <var>title</var>
1620              <em>
1621
1622                <!-- TYPE -->
1623                <div style="display:inline">
1624                  (
1625                    <span class="optional" style="display: none; ">optional</span>
1626                    <span class="enum" style="display: none; ">enumerated</span>
1627                    <span id="typeTemplate">
1628                      <span style="display: none; ">
1629                        <a> Type</a>
1630                      </span>
1631                      <span>
1632                        <span style="display: none; ">
1633                          array of <span><span></span></span>
1634                        </span>
1635                        <span>string</span>
1636                        <span style="display: none; "></span>
1637                      </span>
1638                    </span>
1639                  )
1640                </div>
1641
1642              </em>
1643          </dt>
1644          <dd class="todo" style="display: none; ">
1645            Undocumented.
1646          </dd>
1647          <dd>The string the browser action should display when moused over.</dd>
1648          <dd style="display: none; ">
1649            This parameter was added in version
1650            <b><span></span></b>.
1651            You must omit this parameter in earlier versions,
1652            and you may omit it in any version.  If you require this
1653            parameter, the manifest key
1654            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1655            can ensure that your extension won't be run in an earlier browser version.
1656          </dd>
1657
1658          <!-- OBJECT PROPERTIES -->
1659          <dd style="display: none; ">
1660            <dl>
1661              <div>
1662                <div>
1663                </div>
1664              </div>
1665            </dl>
1666          </dd>
1667
1668          <!-- FUNCTION PARAMETERS -->
1669          <dd style="display: none; ">
1670            <div></div>
1671          </dd>
1672
1673        </div>
1674              </div><div>
1675                <div>
1676          <dt>
1677            <var>tabId</var>
1678              <em>
1679
1680                <!-- TYPE -->
1681                <div style="display:inline">
1682                  (
1683                    <span class="optional">optional</span>
1684                    <span class="enum" style="display: none; ">enumerated</span>
1685                    <span id="typeTemplate">
1686                      <span style="display: none; ">
1687                        <a> Type</a>
1688                      </span>
1689                      <span>
1690                        <span style="display: none; ">
1691                          array of <span><span></span></span>
1692                        </span>
1693                        <span>integer</span>
1694                        <span style="display: none; "></span>
1695                      </span>
1696                    </span>
1697                  )
1698                </div>
1699
1700              </em>
1701          </dt>
1702          <dd class="todo" style="display: none; ">
1703            Undocumented.
1704          </dd>
1705          <dd>Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.</dd>
1706          <dd style="display: none; ">
1707            This parameter was added in version
1708            <b><span></span></b>.
1709            You must omit this parameter in earlier versions,
1710            and you may omit it in any version.  If you require this
1711            parameter, the manifest key
1712            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1713            can ensure that your extension won't be run in an earlier browser version.
1714          </dd>
1715
1716          <!-- OBJECT PROPERTIES -->
1717          <dd style="display: none; ">
1718            <dl>
1719              <div>
1720                <div>
1721                </div>
1722              </div>
1723            </dl>
1724          </dd>
1725
1726          <!-- FUNCTION PARAMETERS -->
1727          <dd style="display: none; ">
1728            <div></div>
1729          </dd>
1730
1731        </div>
1732              </div>
1733            </dl>
1734          </dd>
1735
1736          <!-- FUNCTION PARAMETERS -->
1737          <dd style="display: none; ">
1738            <div></div>
1739          </dd>
1740
1741        </div>
1742                  </div>
1743                </dl>
1744
1745                <!-- RETURNS -->
1746                <h4 style="display: none; ">Returns</h4>
1747                <dl>
1748                  <div style="display: none; ">
1749                    <div>
1750                    </div>
1751                  </div>
1752                </dl>
1753
1754                <!-- CALLBACK -->
1755                <div style="display: none; ">
1756                  <div>
1757                  <h4>Callback function</h4>
1758                  <p>
1759                    The callback <em>parameter</em> should specify a function
1760                    that looks like this:
1761                  </p>
1762                  <p>
1763                    If you specify the <em>callback</em> parameter, it should
1764                    specify a function that looks like this:
1765                  </p>
1766
1767                  <!-- Note: intentionally longer 80 columns -->
1768                  <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
1769                  <dl>
1770                    <div>
1771                      <div>
1772                      </div>
1773                    </div>
1774                  </dl>
1775                  </div>
1776                </div>
1777
1778                <!-- MIN_VERSION -->
1779                <p style="display: none; ">
1780                  This function was added in version <b><span></span></b>.
1781                  If you require this function, the manifest key
1782                  <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1783                  can ensure that your extension won't be run in an earlier browser version.
1784                </p>
1785              </div> <!-- /description -->
1786
1787            </div>  <!-- /apiItem -->
1788
1789          </div>  <!-- /apiGroup -->
1790
1791          <!-- EVENTS -->
1792          <div class="apiGroup">
1793            <a name="events"></a>
1794            <h3 id="events">Events</h3>
1795
1796            <!-- iterates over all events -->
1797            <div class="apiItem">
1798              <a name="event-onClicked"></a>
1799              <h4>onClicked</h4>
1800
1801              <div class="summary">
1802                <!-- Note: intentionally longer 80 columns -->
1803                <span class="subdued">chrome.browserAction.</span><span>onClicked</span><span class="subdued">.addListener</span>(function(<span>Tab tab</span>) <span class="subdued">{...}</span>);
1804              </div>
1805
1806              <div class="description">
1807                <p class="todo" style="display: none; ">Undocumented.</p>
1808                <p>Fired when a browser action icon is clicked.  This event will not fire if the browser action has a popup.</p>
1809
1810                <!-- PARAMETERS -->
1811                <h4>Parameters</h4>
1812                <dl>
1813                  <div>
1814                    <div>
1815          <dt>
1816            <var>tab</var>
1817              <em>
1818
1819                <!-- TYPE -->
1820                <div style="display:inline">
1821                  (
1822                    <span class="optional" style="display: none; ">optional</span>
1823                    <span class="enum" style="display: none; ">enumerated</span>
1824                    <span id="typeTemplate">
1825                      <span>
1826                        <a href="tabs.html#type-Tab">Tab</a>
1827                      </span>
1828                      <span style="display: none; ">
1829                        <span>
1830                          array of <span><span></span></span>
1831                        </span>
1832                        <span>paramType</span>
1833                        <span></span>
1834                      </span>
1835                    </span>
1836                  )
1837                </div>
1838
1839              </em>
1840          </dt>
1841          <dd class="todo">
1842            Undocumented.
1843          </dd>
1844          <dd style="display: none; ">
1845            Description of this parameter from the json schema.
1846          </dd>
1847          <dd style="display: none; ">
1848            This parameter was added in version
1849            <b><span></span></b>.
1850            You must omit this parameter in earlier versions,
1851            and you may omit it in any version.  If you require this
1852            parameter, the manifest key
1853            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
1854            can ensure that your extension won't be run in an earlier browser version.
1855          </dd>
1856
1857          <!-- OBJECT PROPERTIES -->
1858          <dd style="display: none; ">
1859            <dl>
1860              <div>
1861                <div>
1862                </div>
1863              </div>
1864            </dl>
1865          </dd>
1866
1867          <!-- FUNCTION PARAMETERS -->
1868          <dd style="display: none; ">
1869            <div></div>
1870          </dd>
1871
1872        </div>
1873                  </div>
1874                </dl>
1875
1876              </div> <!-- /decription -->
1877
1878            </div> <!-- /apiItem -->
1879
1880          </div> <!-- /apiGroup -->
1881
1882          <!-- TYPES -->
1883          <div class="apiGroup" style="display: none; ">
1884            <a name="types"></a>
1885            <h3 id="types">Types</h3>
1886
1887            <!-- iterates over all types -->
1888            <div class="apiItem">
1889              <a></a>
1890              <h4>type name</h4>
1891
1892              <div>
1893              </div>
1894
1895            </div> <!-- /apiItem -->
1896
1897          </div> <!-- /apiGroup -->
1898
1899        </div> <!-- /apiPage -->
1900      </div> <!-- /gc-pagecontent -->
1901    </div> <!-- /g-section -->
1902  </div> <!-- /codesiteContent -->
1903    <div id="gc-footer" --="">
1904      <div class="text">
1905  <p>
1906  Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>,
1907  the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons
1908  Attribution 3.0 License</a>, and code samples are licensed under the
1909  <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>.
1910  </p>
1911  <p>
1912  ©2011 Google
1913  </p>
1914
1915<!-- begin analytics -->
1916<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
1917<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
1918
1919<script type="text/javascript">
1920  // chrome doc tracking
1921  try {
1922    var engdocs = _gat._getTracker("YT-10763712-2");
1923    engdocs._trackPageview();
1924  } catch(err) {}
1925
1926  // code.google.com site-wide tracking
1927  try {
1928    _uacct="UA-18071-1";
1929    _uanchor=1;
1930    _uff=0;
1931    urchinTracker();
1932  }
1933  catch(e) {/* urchinTracker not available. */}
1934</script>
1935<!-- end analytics -->
1936      </div>
1937    </div> <!-- /gc-footer -->
1938  </div> <!-- /gc-container -->
1939</body></html>
1940