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