experimental.webInspector.html revision ddb351dbec246cf1fab5ec20d2d5520909041de1
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>experimental.webInspector.* 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">experimental.webInspector.* 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">experimental.webInspector.* APIs</div> 316 317<p> 318The following API modules provide support for extending 319Chrome Development Tools (aka WebInspector): 320</p> 321 322<a name="api-list"></a> 323<ul> 324 <li> 325 <a href="experimental.webInspector.audits.html">experimental.webInspector.audits</a></li><li> 326 <a href="experimental.webInspector.inspectedWindow.html">experimental.webInspector.inspectedWindow</a></li><li> 327 <a href="experimental.webInspector.panels.html">experimental.webInspector.panels</a></li><li> 328 <a href="experimental.webInspector.resources.html">experimental.webInspector.resources</a></li> 329</ul> 330 331<p class="warning"> 332<b>Caution:</b> 333Don't depend on these experimental APIs. They might disappear, and they 334<em>will</em> change. 335Also, the Chrome Developer Dashboard doesn't allow you to 336upload extensions that use experimental APIs. 337</p> 338 339<h2 id="using">How to use WebInspector APIs</h2> 340 341<ol> 342 <li> 343 WebInspector APIs are currently experimental, so please start with 344 <a href="experimental.html">the steps for using experimental extension 345 APIs</a>. 346 </li> 347 <li> 348 Specify the "devtools_page" field in your extension's manifest and make 349 sure you have "experimental" permission: 350<pre>{ 351 "name": ... 352 "version": "1.0", 353 "minimum_chrome_version": "10.0", 354 <b>"devtools_page": "devtools.html"</b>, 355 "permissions": [ <b>"experimental"</b> ... ], 356 ... 357} 358</pre> 359 </li> 360 <li> 361 An instance of the devtools_page specified in your extension's manifest 362 will be created for every Developer Tools window opened. The page may add 363 other extension pages as panels and sidebars to the Developer Tools window 364 using <a href="experimental.webInspector.panels">experimental.webInspector.panels</a> 365 API. 366 </li> 367 <li>The APIs available to extension pages within the Developer Tools 368 window include all <a href="#api-list">experimental.webInspector modules 369 listed above</a> and <a href="extension.html">chrome.extension</a> API. 370 Other extension APIs are not available to the Developer Tools pages, but 371 you may invoke them by sending a request to the background page of your 372 extension, similarly to how it's done in the 373 <a href="overview.html#contentScripts">content scripts</a>. 374 </li><li>Please note that, unlike other Chrome Extension APIs, the WebInspector 375 APIs lack "chrome" prefix. This is because the APIs, as the WebInspector 376 itself, are a part of WebKit and may eventually appear in other browsers. 377 </li> 378 <li> 379 <a href="http://groups.google.com/group/google-chrome-developer-tools/topics">Give us feedback!</a> 380 Your comments and suggestions help us improve the APIs and decide which 381 ones should move from experimental to supported. 382 </li> 383</ol> 384 385<h2 id="other">More information</h2> 386 387<p> 388For information on the standard APIs that extensions can use, see 389<a href="api_index.html">chrome.* APIs</a> and 390<a href="api_other.html">Other APIs</a>. 391</p> 392</div> 393 394 <!-- API PAGE --> 395 <div class="apiPage" style="display: none; "> 396 <a name="apiReference"></a> 397 <h2>API reference: chrome.apiname </h2> 398 399 <!-- PROPERTIES --> 400 <div class="apiGroup"> 401 <a name="properties"></a> 402 <h3 id="properties">Properties</h3> 403 404 <div> 405 <a></a> 406 <h4>getLastError</h4> 407 <div class="summary"> 408 <!-- Note: intentionally longer 80 columns --> 409 <span>chrome.extension</span><span>lastError</span> 410 </div> 411 <div> 412 </div> 413 </div> 414 415 </div> <!-- /apiGroup --> 416 417 <!-- METHODS --> 418 <div id="methodsTemplate" class="apiGroup"> 419 <a></a> 420 <h3>Methods</h3> 421 422 <!-- iterates over all functions --> 423 <div class="apiItem"> 424 <a></a> <!-- method-anchor --> 425 <h4>method name</h4> 426 427 <div class="summary"><span>void</span> 428 <!-- Note: intentionally longer 80 columns --> 429 <span>chrome.module.methodName</span>(<span><span>, </span><span></span> 430 <var><span></span></var></span>)</div> 431 432 <div class="description"> 433 <p class="todo">Undocumented.</p> 434 <p> 435 A description from the json schema def of the function goes here. 436 </p> 437 438 <!-- PARAMETERS --> 439 <h4>Parameters</h4> 440 <dl> 441 <div> 442 <div> 443 </div> 444 </div> 445 </dl> 446 447 <!-- RETURNS --> 448 <h4>Returns</h4> 449 <dl> 450 <div> 451 <div> 452 </div> 453 </div> 454 </dl> 455 456 <!-- CALLBACK --> 457 <div> 458 <div> 459 <h4>Callback function</h4> 460 <p> 461 The callback <em>parameter</em> should specify a function 462 that looks like this: 463 </p> 464 <p> 465 If you specify the <em>callback</em> parameter, it should 466 specify a function that looks like this: 467 </p> 468 469 <!-- Note: intentionally longer 80 columns --> 470 <pre>function(<span>Type param1, Type param2</span>) <span class="subdued">{...}</span>;</pre> 471 <dl> 472 <div> 473 <div> 474 </div> 475 </div> 476 </dl> 477 </div> 478 </div> 479 480 <!-- MIN_VERSION --> 481 <p> 482 This function was added in version <b><span></span></b>. 483 If you require this function, the manifest key 484 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 485 can ensure that your extension won't be run in an earlier browser version. 486 </p> 487 </div> <!-- /description --> 488 489 </div> <!-- /apiItem --> 490 491 </div> <!-- /apiGroup --> 492 493 <!-- EVENTS --> 494 <div id="eventsTemplate" class="apiGroup"> 495 <a></a> 496 <h3>Events</h3> 497 <!-- iterates over all events --> 498 <div class="apiItem"> 499 <a></a> 500 <h4>event name</h4> 501 502 <div class="summary"> 503 <!-- Note: intentionally longer 80 columns --> 504 <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>); 505 </div> 506 507 <div class="description"> 508 <p class="todo">Undocumented.</p> 509 <p> 510 A description from the json schema def of the event goes here. 511 </p> 512 513 <!-- PARAMETERS --> 514 <div> 515 <h4>Parameters</h4> 516 <dl> 517 <div> 518 <div> 519 </div> 520 </div> 521 </dl> 522 </div> 523 </div> <!-- /decription --> 524 525 </div> <!-- /apiItem --> 526 527 </div> <!-- /apiGroup --> 528 529 <!-- TYPES --> 530 <div class="apiGroup"> 531 <a name="types"></a> 532 <h3 id="types">Types</h3> 533 534 <!-- iterates over all types --> 535 <div class="apiItem"> 536 <a></a> 537 <h4>type name</h4> 538 539 <div> 540 </div> 541 542 </div> <!-- /apiItem --> 543 544 </div> <!-- /apiGroup --> 545 546 </div> <!-- /apiPage --> 547 </div> <!-- /gc-pagecontent --> 548 </div> <!-- /g-section --> 549 </div> <!-- /codesiteContent --> 550 <div id="gc-footer" --=""> 551 <div class="text"> 552 <p> 553 Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>, 554 the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons 555 Attribution 3.0 License</a>, and code samples are licensed under the 556 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>. 557 </p> 558 <p> 559 ©2011 Google 560 </p> 561 562<!-- begin analytics --> 563<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script> 564<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script> 565 566<script type="text/javascript"> 567 // chrome doc tracking 568 try { 569 var engdocs = _gat._getTracker("YT-10763712-2"); 570 engdocs._trackPageview(); 571 } catch(err) {} 572 573 // code.google.com site-wide tracking 574 try { 575 _uacct="UA-18071-1"; 576 _uanchor=1; 577 _uff=0; 578 urchinTracker(); 579 } 580 catch(e) {/* urchinTracker not available. */} 581</script> 582<!-- end analytics --> 583 </div> 584 </div> <!-- /gc-footer --> 585 </div> <!-- /gc-container --> 586</body></html> 587