experimental.html revision 731df977c0511bca2206b5f333555b1205ff1f43
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  <title>chrome.experimental.* APIs - Google Chrome Extensions - Google Code</title></head>
19  <body>  <div id="gc-container" class="labs">
20      <div id="devModeWarning">
21        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.
22      </div>
23      <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION -->
24      <!-- In particular, sub-templates that recurse, must be used by allowing
25           jstemplate to make a copy of the template in this section which
26           are not operated on by way of the jsskip="true" -->
27      <div style="display:none">
28
29        <!-- VALUE -->
30        <div id="valueTemplate">
31          <dt>
32            <var>paramName</var>
33              <em>
34
35                <!-- TYPE -->
36                <div style="display:inline">
37                  (
38                    <span class="optional">optional</span>
39                    <span class="enum">enumerated</span>
40                    <span id="typeTemplate">
41                      <span>
42                        <a> Type</a>
43                      </span>
44                      <span>
45                        <span>
46                          array of <span><span></span></span>
47                        </span>
48                        <span>paramType</span>
49                        <span></span>
50                      </span>
51                    </span>
52                  )
53                </div>
54
55              </em>
56          </dt>
57          <dd class="todo">
58            Undocumented.
59          </dd>
60          <dd>
61            Description of this parameter from the json schema.
62          </dd>
63          <dd>
64            This parameter was added in version
65            <b><span></span></b>.
66            You must omit this parameter in earlier versions,
67            and you may omit it in any version.  If you require this
68            parameter, the manifest key
69            <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
70            can ensure that your extension won't be run in an earlier browser version.
71          </dd>
72
73          <!-- OBJECT PROPERTIES -->
74          <dd>
75            <dl>
76              <div>
77                <div>
78                </div>
79              </div>
80            </dl>
81          </dd>
82
83          <!-- FUNCTION PARAMETERS -->
84          <dd>
85            <div></div>
86          </dd>
87
88        </div> <!-- /VALUE -->
89
90        <div id="functionParametersTemplate">
91          <h5>Parameters</h5>
92          <dl>
93            <div>
94              <div>
95              </div>
96            </div>
97          </dl>         
98        </div>
99      </div> <!-- /SUBTEMPLATES -->
100
101  <a id="top"></a>
102    <div id="skipto">
103      <a href="#gc-pagecontent">Skip to page content</a>
104      <a href="#gc-toc">Skip to main navigation</a>
105    </div>
106    <!-- API HEADER -->
107    <table id="header" width="100%" cellspacing="0" border="0">
108      <tbody><tr>
109        <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>
110        <td valign="middle" width="100%" style="padding-left:0.6em;">
111          <form action="http://www.google.com/cse" id="cse" style="margin-top:0.5em">
112            <div id="gsc-search-box">
113              <input type="hidden" name="cx" value="002967670403910741006:61_cvzfqtno">
114              <input type="hidden" name="ie" value="UTF-8">
115              <input type="text" name="q" value="" size="55">
116              <input class="gsc-search-button" type="submit" name="sa" value="Search">
117              <br>
118              <span class="greytext">e.g. "page action" or "tabs"</span>
119            </div>
120          </form>
121
122          <script type="text/javascript" src="http://www.google.com/jsapi"></script>
123          <script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
124          <script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse&t13n_langs=en"></script>
125          <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse&lang=en"></script>
126        </td>
127      </tr>
128    </tbody></table>
129
130    <div id="codesiteContent" class="">
131
132      <a id="gc-topnav-anchor"></a>
133      <div id="gc-topnav">
134        <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Labs</a>)</h1>
135        <ul id="home" class="gc-topnav-tabs">
136          <li id="home_link">
137            <a href="index.html" title="Google Chrome Extensions home page">Home</a>
138          </li>
139          <li id="docs_link">
140            <a href="docs.html" title="Official Google Chrome Extensions documentation">Docs</a>
141          </li>
142          <li id="faq_link">
143            <a href="faq.html" title="Answers to frequently asked questions about Google Chrome Extensions">FAQ</a>
144          </li>
145          <li id="samples_link">
146            <a href="samples.html" title="Sample extensions (with source code)">Samples</a>
147          </li>
148          <li id="group_link">
149            <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions" title="Google Chrome Extensions developer forum">Group</a>
150          </li>
151        </ul>
152      </div> <!-- end gc-topnav -->
153
154    <div class="g-section g-tpl-170">
155      <!-- SIDENAV -->
156      <div class="g-unit g-first" id="gc-toc">
157        <ul>
158          <li><a href="getstarted.html">Getting Started</a></li>
159          <li><a href="overview.html">Overview</a></li>
160          <li><a href="whats_new.html">What's New?</a></li>
161          <li><h2><a href="devguide.html">Developer's Guide</a></h2>
162            <ul>
163              <li>Browser UI
164                <ul>
165                  <li><a href="browserAction.html">Browser Actions</a></li>
166                  <li><a href="contextMenus.html">Context Menus</a></li>
167                  <li><a href="notifications.html">Desktop Notifications</a></li>
168                  <li><a href="options.html">Options Pages</a></li>
169                  <li><a href="override.html">Override Pages</a></li>
170                  <li><a href="pageAction.html">Page Actions</a></li>
171                  <li><a href="themes.html">Themes</a></li>
172                </ul>
173              </li>
174              <li>Browser Interaction
175                <ul>
176                  <li><a href="bookmarks.html">Bookmarks</a></li>
177                  <li><a href="cookies.html">Cookies</a></li>
178                  <li><a href="events.html">Events</a></li>
179                  <li><a href="history.html">History</a></li>
180                  <li><a href="management.html">Management</a></li>
181                  <li><a href="tabs.html">Tabs</a></li>
182                  <li><a href="windows.html">Windows</a></li>
183                </ul>
184              </li>
185              <li>Implementation
186                <ul>
187                  <li><a href="a11y.html">Accessibility</a></li>
188                  <li><a href="background_pages.html">Background Pages</a></li>
189                  <li><a href="content_scripts.html">Content Scripts</a></li>
190                  <li><a href="xhr.html">Cross-Origin XHR</a></li>
191                  <li><a href="idle.html">Idle</a></li>
192                  <li><a href="i18n.html">Internationalization</a></li>
193                  <li><a href="messaging.html">Message Passing</a></li>
194                  <li><a href="npapi.html">NPAPI Plugins</a></li>
195                </ul>
196              </li>
197              <li>Finishing
198                <ul>
199                  <li><a href="hosting.html">Hosting</a></li>
200                  <li><a href="external_extensions.html">Other Deployment Options</a></li>
201                </ul>
202              </li>
203            </ul>
204          </li>
205          <li><h2><a href="tutorials.html">Tutorials</a></h2>
206            <ul>
207              <li><a href="tut_debugging.html">Debugging</a></li>
208              <li><a href="tut_analytics.html">Google Analytics</a></li>
209              <li><a href="tut_oauth.html">OAuth</a></li>
210            </ul>
211          </li>
212          <li><h2>Reference</h2>
213            <ul>
214              <li>Formats
215                <ul>
216                  <li><a href="manifest.html">Manifest Files</a></li>
217                  <li><a href="match_patterns.html">Match Patterns</a></li>
218                  <!-- <li>Packages (.crx)</li> -->
219                </ul>
220              </li>
221              <li><a href="api_index.html">chrome.* APIs</a></li>
222              <li><a href="api_other.html">Other APIs</a></li>
223            </ul>
224          </li>
225         <li><h2><a href="samples.html">Samples</a></h2></li>
226        </ul>
227      </div>
228
229    <div class="g-unit" id="gc-pagecontent">
230      <div id="pageTitle">
231        <h1 class="page_title">chrome.experimental.* APIs</h1>
232      </div>
233        <!-- TABLE OF CONTENTS -->
234        <div id="toc" style="display: none; ">
235          <h2>Contents</h2>
236          <ol>
237            <li>
238              <a>h2Name</a>
239              <ol>
240                <li>
241                  <a>h3Name</a>
242                </li>
243              </ol>
244            </li>
245              <li>
246                <a href="#apiReference">API reference</a>
247                <ol>
248                  <li>
249                    <a href="#properties">Properties</a>
250                    <ol>
251                      <li>
252                        <a href="#property-anchor">propertyName</a>
253                      </li>
254                    </ol>
255                  </li>
256                  <li>
257                    <a href="#methods">Methods</a>
258                    <ol>
259                      <li>
260                        <a href="#method-anchor">methodName</a>
261                      </li>
262                    </ol>
263                  </li>
264                  <li>
265                    <a href="#events">Events</a>
266                    <ol>
267                      <li>
268                        <a href="#event-anchor">eventName</a>
269                      </li>
270                    </ol>
271                  </li>
272                  <li>
273                    <a href="#types">Types</a>
274                    <ol>
275                      <li>
276                        <a href="#id-anchor">id</a>
277                      </li>
278                    </ol>
279                  </li>
280                </ol>
281              </li>
282          </ol>
283        </div>
284        <!-- /TABLE OF CONTENTS -->
285
286        <!-- Standard content lead-in for experimental API pages -->
287        <p id="classSummary" style="display: none; ">
288          For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page.
289        </p>
290
291        <!-- STATIC CONTENT PLACEHOLDER -->
292        <div id="static"><div id="pageData-name" class="pageData">chrome.experimental.* APIs</div>
293
294<p>
295We'd like your <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions/topics">feedback</a>
296on the following experimental APIs:
297</p>
298
299<ul>
300  <li>
301  <a href="experimental.clipboard.html">experimental.clipboard</a></li><li>
302  <a href="experimental.infobars.html">experimental.infobars</a></li><li>
303  <a href="experimental.omnibox.html">experimental.omnibox</a></li><li>
304  <a href="experimental.processes.html">experimental.processes</a></li><li>
305  <a href="experimental.proxy.html">experimental.proxy</a></li><li>
306  <a href="experimental.sidebar.html">experimental.sidebar</a></li><li>
307  <a href="experimental.webNavigation.html">experimental.webNavigation</a></li><li>
308  <a href="experimental.webRequest.html">experimental.webRequest</a></li>
309</ul>
310
311<p class="caution">
312<b>Caution:</b>
313Don't depend on these experimental APIs.
314They might disappear,
315and they <em>will</em> change.
316Also, the extension gallery doesn't allow you to
317upload extensions that use experimental APIs.
318</p>
319
320<h2 id="using">How to use experimental APIs</h2>
321
322<ol>
323  <li>
324    Make sure you're using the
325<a href="http://www.chromium.org/getting-involved/dev-channel">Dev channel</a>
326    of Google Chrome.
327    Although the experimental APIs might work in other versions,
328    we need your feedback on the latest incarnation of the APIs,
329    which you can find on the Dev channel.
330  </li>
331  <li>
332    Using the
333    <a href="http://code.google.com/chrome/extensions/dev/experimental.html">API documentation for the Dev channel</a>,
334    write the code for your extension.
335  </li>
336  <li>
337    Specify the "experimental"
338    <a href="manifest.html#permissions">permission</a>
339    in your extension's manifest, like this:
340<pre>"permissions": [
341  <b>"experimental"</b>,
342  ...
343],
344</pre>
345  </li>
346  <li>
347    Specify the <b>--enable-experimental-extension-apis</b> flag
348    when you launch the browser.
349    On Windows, you can do this by modifying
350    the properties of the shortcut that you use to launch Google Chrome.
351    For example:
352
353<pre><em>path_to_chrome.exe</em> <b>--enable-experimental-extension-apis</b></pre>
354  </li>
355
356  <li>
357    <a href="http://groups.google.com/a/chromium.org/group/chromium-extensions/topics">Give us feedback!</a>
358    Your comments and suggestions help us
359    improve the APIs and decide
360    which ones should move from experimental to supported.
361  </li>
362</ol>
363
364<h2 id="other">More information</h2>
365
366<p>
367For information on the standard APIs that extensions can use, see
368<a href="api_index.html">chrome.* APIs</a> and
369<a href="api_other.html">Other APIs</a>.
370</p>
371</div>
372
373        <!-- API PAGE -->
374        <div class="apiPage" style="display: none; ">
375        <a name="apiReference"></a>
376        <h2>API reference: chrome.apiname </h2>
377
378          <!-- PROPERTIES -->
379          <div class="apiGroup">
380            <a name="properties"></a>
381            <h3 id="properties">Properties</h3>
382
383            <div>
384              <a></a>
385              <h4>getLastError</h4>
386              <div class="summary">
387                <!-- Note: intentionally longer 80 columns -->
388                <span>chrome.extension</span><span>lastError</span>
389              </div>
390              <div>
391              </div>
392            </div>
393
394          </div> <!-- /apiGroup -->
395
396          <!-- METHODS -->
397          <div class="apiGroup" id="methods">
398            <a name="methods"></a>
399            <h3>Methods</h3>
400
401            <!-- iterates over all functions -->
402            <div class="apiItem">
403              <a></a> <!-- method-anchor -->
404              <h4>method name</h4>
405
406              <div class="summary"><span>void</span>
407                  <!-- Note: intentionally longer 80 columns -->
408                  <span>chrome.module.methodName</span>(<span><span>, </span><span></span>
409                      <var><span></span></var></span>)</div>
410
411              <div class="description">
412                <p class="todo">Undocumented.</p>
413                <p>
414                  A description from the json schema def of the function goes here.
415                </p>
416
417                <!-- PARAMETERS -->
418                <h4>Parameters</h4>
419                <dl>
420                  <div>
421                    <div>
422                    </div>
423                  </div>
424                </dl>
425
426                <!-- RETURNS -->
427                <h4>Returns</h4>
428                <dl>
429                  <div>
430                    <div>
431                    </div>
432                  </div>
433                </dl>
434
435                <!-- CALLBACK -->
436                <div>
437                  <div>
438                  <h4>Callback function</h4>
439                  <p>
440                    The callback <em>parameter</em> should specify a function
441                    that looks like this:
442                  </p>
443                  <p>
444                    If you specify the <em>callback</em> parameter, it should
445                    specify a function that looks like this:
446                  </p>
447
448                  <!-- Note: intentionally longer 80 columns -->
449                  <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre>
450                  <dl>
451                    <div>
452                      <div>
453                      </div>
454                    </div>
455                  </dl>
456                  </div>
457                </div>
458
459                <!-- MIN_VERSION -->
460                <p>
461                  This function was added in version <b><span></span></b>.
462                  If you require this function, the manifest key
463                  <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a>
464                  can ensure that your extension won't be run in an earlier browser version.
465                </p>
466              </div> <!-- /description -->
467
468            </div>  <!-- /apiItem -->
469
470          </div>  <!-- /apiGroup -->
471
472          <!-- EVENTS -->
473          <div class="apiGroup">
474            <a name="events"></a>
475            <h3 id="events">Events</h3>
476
477            <!-- iterates over all events -->
478            <div class="apiItem">
479              <a></a>
480              <h4>event name</h4>
481
482              <div class="summary">
483                <!-- Note: intentionally longer 80 columns -->
484                <span class="subdued">chrome.bookmarks</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>);
485              </div>
486
487              <div class="description">
488                <p class="todo">Undocumented.</p>
489                <p>
490                  A description from the json schema def of the event goes here.
491                </p>
492
493                <!-- PARAMETERS -->
494                <h4>Parameters</h4>
495                <dl>
496                  <div>
497                    <div>
498                    </div>
499                  </div>
500                </dl>
501
502              </div> <!-- /decription -->
503
504            </div> <!-- /apiItem -->
505
506          </div> <!-- /apiGroup -->
507
508          <!-- TYPES -->
509          <div class="apiGroup">
510            <a name="types"></a>
511            <h3 id="types">Types</h3>
512
513            <!-- iterates over all types -->
514            <div class="apiItem">
515              <a></a>
516              <h4>type name</h4>
517
518              <div>
519              </div>
520
521            </div> <!-- /apiItem -->
522
523          </div> <!-- /apiGroup -->
524
525        </div> <!-- /apiPage -->
526      </div> <!-- /gc-pagecontent -->
527    </div> <!-- /g-section -->
528  </div> <!-- /codesiteContent -->
529    <div id="gc-footer" --="">
530      <div class="text">
531  <p>
532  Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>,
533  the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons
534  Attribution 3.0 License</a>, and code samples are licensed under the
535  <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>.
536  </p>
537  <p>
538  ©2010 Google
539  </p>
540
541<!-- begin analytics -->
542<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
543<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
544
545<script type="text/javascript">
546  // chrome doc tracking
547  try {
548    var engdocs = _gat._getTracker("YT-10763712-2");
549    engdocs._trackPageview();
550  } catch(err) {}
551
552  // code.google.com site-wide tracking
553  try {
554    _uacct="UA-18071-1";
555    _uanchor=1;
556    _uff=0;
557    urchinTracker();
558  }
559  catch(e) {/* urchinTracker not available. */}
560</script>
561<!-- end analytics -->
562      </div>
563    </div> <!-- /gc-footer -->
564  </div> <!-- /gc-container -->
565</body></html>
566