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.debugger - 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.debugger</h1> 255 </div> 256 <!-- TABLE OF CONTENTS --> 257 <div id="toc"> 258 <h2>Contents</h2> 259 <ol> 260 <li> 261 <a href="#H2-0">Notes</a> 262 <ol> 263 <li style="display: none; "> 264 <a>h3Name</a> 265 </li> 266 </ol> 267 </li> 268 <li> 269 <a href="#apiReference">API reference: chrome.experimental.debugger</a> 270 <ol> 271 <li style="display: none; "> 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 href="#global-methods">Methods</a> 281 <ol> 282 <li> 283 <a href="#method-attach">attach</a> 284 </li><li> 285 <a href="#method-detach">detach</a> 286 </li><li> 287 <a href="#method-sendRequest">sendRequest</a> 288 </li> 289 </ol> 290 </li> 291 <li> 292 <a href="#global-events">Events</a> 293 <ol> 294 <li> 295 <a href="#event-onDetach">onDetach</a> 296 </li><li> 297 <a href="#event-onEvent">onEvent</a> 298 </li> 299 </ol> 300 </li> 301 <li style="display: none; "> 302 <a href="#types">Types</a> 303 <ol> 304 <li> 305 <a href="#id-anchor">id</a> 306 </li> 307 </ol> 308 </li> 309 </ol> 310 </li> 311 </ol> 312 </div> 313 <!-- /TABLE OF CONTENTS --> 314 315 <!-- Standard content lead-in for experimental API pages --> 316 <p id="classSummary"> 317 For information on how to use experimental APIs, see the <a href="experimental.html">chrome.experimental.* APIs</a> page. 318 </p> 319 320 <!-- STATIC CONTENT PLACEHOLDER --> 321 <div id="static"><!-- BEGIN AUTHORED CONTENT --> 322 323 324 <a name="H2-0"></a><h2>Notes</h2> 325 326 <p> 327 Debugger API exposes Google Chrome debugging interface to the extensions. 328 Debugging messages that are being sent and received are all JSON objects 329 with the structure defined by the Developer Tools / Web Inspector Protocol. 330 We are currently drafting this protocol, it is by no means ready and stable, 331 but we can already expose the way to attach to a given tab and instrument it. 332 Although not finalized, this API is feature rich. There is a proof of concept 333 implementation of the Chrome Developer Tools front-end running as an extension 334 using the debugger API. 335 </p> 336 337 <p> 338 Note that attaching to the page by means of the debugger API and using embedded 339 Chrome Developer Tools with it are mutually exclusive. If extension is attached 340 to the page and user invokes Developer Tools, debugging session is being 341 terminated. Extension can then re-establish it via attaching to a tab later. 342 </p> 343 344 <!-- END AUTHORED CONTENT --> 345 </div> 346 347 <!-- API PAGE --> 348 <div class="apiPage"> 349 <a name="apiReference"></a> 350 <h2>API reference: chrome.experimental.debugger</h2> 351 352 <!-- PROPERTIES --> 353 <div class="apiGroup" style="display: none; "> 354 <a name="properties"></a> 355 <h3 id="properties">Properties</h3> 356 357 <div> 358 <a></a> 359 <h4>getLastError</h4> 360 <div class="summary"> 361 <!-- Note: intentionally longer 80 columns --> 362 <span>chrome.extension</span><span>lastError</span> 363 </div> 364 <div> 365 </div> 366 </div> 367 368 </div> <!-- /apiGroup --> 369 370 <!-- METHODS --> 371 <div id="methodsTemplate" class="apiGroup"> 372 <a name="global-methods"></a> 373 <h3>Methods</h3> 374 375 <!-- iterates over all functions --> 376 <div class="apiItem"> 377 <a name="method-attach"></a> <!-- method-anchor --> 378 <h4>attach</h4> 379 380 <div class="summary"><span style="display: none; ">void</span> 381 <!-- Note: intentionally longer 80 columns --> 382 <span>chrome.experimental.debugger.attach</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> 383 <var><span>tabId</span></var></span><span class="optional"><span>, </span><span>function</span> 384 <var><span>callback</span></var></span>)</div> 385 386 <div class="description"> 387 <p class="todo" style="display: none; ">Undocumented.</p> 388 <p>Attaches debugger to the tab with given id.</p> 389 390 <!-- PARAMETERS --> 391 <h4>Parameters</h4> 392 <dl> 393 <div> 394 <div> 395 <dt> 396 <var>tabId</var> 397 <em> 398 399 <!-- TYPE --> 400 <div style="display:inline"> 401 ( 402 <span class="optional" style="display: none; ">optional</span> 403 <span class="enum" style="display: none; ">enumerated</span> 404 <span id="typeTemplate"> 405 <span style="display: none; "> 406 <a> Type</a> 407 </span> 408 <span> 409 <span style="display: none; "> 410 array of <span><span></span></span> 411 </span> 412 <span>integer</span> 413 <span style="display: none; "></span> 414 </span> 415 </span> 416 ) 417 </div> 418 419 </em> 420 </dt> 421 <dd class="todo" style="display: none; "> 422 Undocumented. 423 </dd> 424 <dd>The id of the tab to which you want to attach.</dd> 425 <dd style="display: none; "> 426 This parameter was added in version 427 <b><span></span></b>. 428 You must omit this parameter in earlier versions, 429 and you may omit it in any version. If you require this 430 parameter, the manifest key 431 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 432 can ensure that your extension won't be run in an earlier browser version. 433 </dd> 434 435 <!-- OBJECT PROPERTIES --> 436 <dd style="display: none; "> 437 <dl> 438 <div> 439 <div> 440 </div> 441 </div> 442 </dl> 443 </dd> 444 445 <!-- OBJECT METHODS --> 446 <dd style="display: none; "> 447 <div></div> 448 </dd> 449 450 <!-- OBJECT EVENT FIELDS --> 451 <dd style="display: none; "> 452 <div></div> 453 </dd> 454 455 <!-- FUNCTION PARAMETERS --> 456 <dd style="display: none; "> 457 <div></div> 458 </dd> 459 460 </div> 461 </div><div> 462 <div> 463 <dt> 464 <var>callback</var> 465 <em> 466 467 <!-- TYPE --> 468 <div style="display:inline"> 469 ( 470 <span class="optional">optional</span> 471 <span class="enum" style="display: none; ">enumerated</span> 472 <span id="typeTemplate"> 473 <span style="display: none; "> 474 <a> Type</a> 475 </span> 476 <span> 477 <span style="display: none; "> 478 array of <span><span></span></span> 479 </span> 480 <span>function</span> 481 <span style="display: none; "></span> 482 </span> 483 </span> 484 ) 485 </div> 486 487 </em> 488 </dt> 489 <dd class="todo" style="display: none; "> 490 Undocumented. 491 </dd> 492 <dd>If an error occurs while attaching to the tab, the callback will be called with no arguments and <a href="extension.html#property-lastError">chrome.extension.lastError</a> will be set to the error message.</dd> 493 <dd style="display: none; "> 494 This parameter was added in version 495 <b><span></span></b>. 496 You must omit this parameter in earlier versions, 497 and you may omit it in any version. If you require this 498 parameter, the manifest key 499 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 500 can ensure that your extension won't be run in an earlier browser version. 501 </dd> 502 503 <!-- OBJECT PROPERTIES --> 504 <dd style="display: none; "> 505 <dl> 506 <div> 507 <div> 508 </div> 509 </div> 510 </dl> 511 </dd> 512 513 <!-- OBJECT METHODS --> 514 <dd style="display: none; "> 515 <div></div> 516 </dd> 517 518 <!-- OBJECT EVENT FIELDS --> 519 <dd style="display: none; "> 520 <div></div> 521 </dd> 522 523 <!-- FUNCTION PARAMETERS --> 524 <dd style="display: none; "> 525 <div></div> 526 </dd> 527 528 </div> 529 </div> 530 </dl> 531 532 <!-- RETURNS --> 533 <h4 style="display: none; ">Returns</h4> 534 <dl> 535 <div style="display: none; "> 536 <div> 537 </div> 538 </div> 539 </dl> 540 541 <!-- CALLBACK --> 542 <div> 543 <div> 544 <h4>Callback function</h4> 545 <p style="display: none; "> 546 The callback <em>parameter</em> should specify a function 547 that looks like this: 548 </p> 549 <p> 550 If you specify the <em>callback</em> parameter, it should 551 specify a function that looks like this: 552 </p> 553 554 <!-- Note: intentionally longer 80 columns --> 555 <pre>function(<span></span>) <span class="subdued">{...}</span>;</pre> 556 <dl> 557 <div style="display: none; "> 558 <div> 559 </div> 560 </div> 561 </dl> 562 </div> 563 </div> 564 565 <!-- MIN_VERSION --> 566 <p style="display: none; "> 567 This function was added in version <b><span></span></b>. 568 If you require this function, the manifest key 569 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 570 can ensure that your extension won't be run in an earlier browser version. 571 </p> 572 </div> <!-- /description --> 573 574 </div><div class="apiItem"> 575 <a name="method-detach"></a> <!-- method-anchor --> 576 <h4>detach</h4> 577 578 <div class="summary"><span style="display: none; ">void</span> 579 <!-- Note: intentionally longer 80 columns --> 580 <span>chrome.experimental.debugger.detach</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> 581 <var><span>tabId</span></var></span><span class="optional"><span>, </span><span>function</span> 582 <var><span>callback</span></var></span>)</div> 583 584 <div class="description"> 585 <p class="todo" style="display: none; ">Undocumented.</p> 586 <p>Detaches debugger from a tab with given id.</p> 587 588 <!-- PARAMETERS --> 589 <h4>Parameters</h4> 590 <dl> 591 <div> 592 <div> 593 <dt> 594 <var>tabId</var> 595 <em> 596 597 <!-- TYPE --> 598 <div style="display:inline"> 599 ( 600 <span class="optional" style="display: none; ">optional</span> 601 <span class="enum" style="display: none; ">enumerated</span> 602 <span id="typeTemplate"> 603 <span style="display: none; "> 604 <a> Type</a> 605 </span> 606 <span> 607 <span style="display: none; "> 608 array of <span><span></span></span> 609 </span> 610 <span>integer</span> 611 <span style="display: none; "></span> 612 </span> 613 </span> 614 ) 615 </div> 616 617 </em> 618 </dt> 619 <dd class="todo" style="display: none; "> 620 Undocumented. 621 </dd> 622 <dd>The id of the tab from which you want to detach.</dd> 623 <dd style="display: none; "> 624 This parameter was added in version 625 <b><span></span></b>. 626 You must omit this parameter in earlier versions, 627 and you may omit it in any version. If you require this 628 parameter, the manifest key 629 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 630 can ensure that your extension won't be run in an earlier browser version. 631 </dd> 632 633 <!-- OBJECT PROPERTIES --> 634 <dd style="display: none; "> 635 <dl> 636 <div> 637 <div> 638 </div> 639 </div> 640 </dl> 641 </dd> 642 643 <!-- OBJECT METHODS --> 644 <dd style="display: none; "> 645 <div></div> 646 </dd> 647 648 <!-- OBJECT EVENT FIELDS --> 649 <dd style="display: none; "> 650 <div></div> 651 </dd> 652 653 <!-- FUNCTION PARAMETERS --> 654 <dd style="display: none; "> 655 <div></div> 656 </dd> 657 658 </div> 659 </div><div> 660 <div> 661 <dt> 662 <var>callback</var> 663 <em> 664 665 <!-- TYPE --> 666 <div style="display:inline"> 667 ( 668 <span class="optional">optional</span> 669 <span class="enum" style="display: none; ">enumerated</span> 670 <span id="typeTemplate"> 671 <span style="display: none; "> 672 <a> Type</a> 673 </span> 674 <span> 675 <span style="display: none; "> 676 array of <span><span></span></span> 677 </span> 678 <span>function</span> 679 <span style="display: none; "></span> 680 </span> 681 </span> 682 ) 683 </div> 684 685 </em> 686 </dt> 687 <dd class="todo" style="display: none; "> 688 Undocumented. 689 </dd> 690 <dd>If an error occurs while detaching from the tab, the callback will be called with no arguments and <a href="extension.html#property-lastError">chrome.extension.lastError</a> will be set to the error message.</dd> 691 <dd style="display: none; "> 692 This parameter was added in version 693 <b><span></span></b>. 694 You must omit this parameter in earlier versions, 695 and you may omit it in any version. If you require this 696 parameter, the manifest key 697 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 698 can ensure that your extension won't be run in an earlier browser version. 699 </dd> 700 701 <!-- OBJECT PROPERTIES --> 702 <dd style="display: none; "> 703 <dl> 704 <div> 705 <div> 706 </div> 707 </div> 708 </dl> 709 </dd> 710 711 <!-- OBJECT METHODS --> 712 <dd style="display: none; "> 713 <div></div> 714 </dd> 715 716 <!-- OBJECT EVENT FIELDS --> 717 <dd style="display: none; "> 718 <div></div> 719 </dd> 720 721 <!-- FUNCTION PARAMETERS --> 722 <dd style="display: none; "> 723 <div></div> 724 </dd> 725 726 </div> 727 </div> 728 </dl> 729 730 <!-- RETURNS --> 731 <h4 style="display: none; ">Returns</h4> 732 <dl> 733 <div style="display: none; "> 734 <div> 735 </div> 736 </div> 737 </dl> 738 739 <!-- CALLBACK --> 740 <div> 741 <div> 742 <h4>Callback function</h4> 743 <p style="display: none; "> 744 The callback <em>parameter</em> should specify a function 745 that looks like this: 746 </p> 747 <p> 748 If you specify the <em>callback</em> parameter, it should 749 specify a function that looks like this: 750 </p> 751 752 <!-- Note: intentionally longer 80 columns --> 753 <pre>function(<span></span>) <span class="subdued">{...}</span>;</pre> 754 <dl> 755 <div style="display: none; "> 756 <div> 757 </div> 758 </div> 759 </dl> 760 </div> 761 </div> 762 763 <!-- MIN_VERSION --> 764 <p style="display: none; "> 765 This function was added in version <b><span></span></b>. 766 If you require this function, the manifest key 767 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 768 can ensure that your extension won't be run in an earlier browser version. 769 </p> 770 </div> <!-- /description --> 771 772 </div><div class="apiItem"> 773 <a name="method-sendRequest"></a> <!-- method-anchor --> 774 <h4>sendRequest</h4> 775 776 <div class="summary"><span style="display: none; ">void</span> 777 <!-- Note: intentionally longer 80 columns --> 778 <span>chrome.experimental.debugger.sendRequest</span>(<span class="null"><span style="display: none; ">, </span><span>integer</span> 779 <var><span>tabId</span></var></span><span class="null"><span>, </span><span>string</span> 780 <var><span>method</span></var></span><span class="optional"><span>, </span><span>object</span> 781 <var><span>params</span></var></span><span class="optional"><span>, </span><span>function</span> 782 <var><span>callback</span></var></span>)</div> 783 784 <div class="description"> 785 <p class="todo" style="display: none; ">Undocumented.</p> 786 <p>Send given request to the debugger.</p> 787 788 <!-- PARAMETERS --> 789 <h4>Parameters</h4> 790 <dl> 791 <div> 792 <div> 793 <dt> 794 <var>tabId</var> 795 <em> 796 797 <!-- TYPE --> 798 <div style="display:inline"> 799 ( 800 <span class="optional" style="display: none; ">optional</span> 801 <span class="enum" style="display: none; ">enumerated</span> 802 <span id="typeTemplate"> 803 <span style="display: none; "> 804 <a> Type</a> 805 </span> 806 <span> 807 <span style="display: none; "> 808 array of <span><span></span></span> 809 </span> 810 <span>integer</span> 811 <span style="display: none; "></span> 812 </span> 813 </span> 814 ) 815 </div> 816 817 </em> 818 </dt> 819 <dd class="todo" style="display: none; "> 820 Undocumented. 821 </dd> 822 <dd>The id of the tab to which you want to send debugging request.</dd> 823 <dd style="display: none; "> 824 This parameter was added in version 825 <b><span></span></b>. 826 You must omit this parameter in earlier versions, 827 and you may omit it in any version. If you require this 828 parameter, the manifest key 829 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 830 can ensure that your extension won't be run in an earlier browser version. 831 </dd> 832 833 <!-- OBJECT PROPERTIES --> 834 <dd style="display: none; "> 835 <dl> 836 <div> 837 <div> 838 </div> 839 </div> 840 </dl> 841 </dd> 842 843 <!-- OBJECT METHODS --> 844 <dd style="display: none; "> 845 <div></div> 846 </dd> 847 848 <!-- OBJECT EVENT FIELDS --> 849 <dd style="display: none; "> 850 <div></div> 851 </dd> 852 853 <!-- FUNCTION PARAMETERS --> 854 <dd style="display: none; "> 855 <div></div> 856 </dd> 857 858 </div> 859 </div><div> 860 <div> 861 <dt> 862 <var>method</var> 863 <em> 864 865 <!-- TYPE --> 866 <div style="display:inline"> 867 ( 868 <span class="optional" style="display: none; ">optional</span> 869 <span class="enum" style="display: none; ">enumerated</span> 870 <span id="typeTemplate"> 871 <span style="display: none; "> 872 <a> Type</a> 873 </span> 874 <span> 875 <span style="display: none; "> 876 array of <span><span></span></span> 877 </span> 878 <span>string</span> 879 <span style="display: none; "></span> 880 </span> 881 </span> 882 ) 883 </div> 884 885 </em> 886 </dt> 887 <dd class="todo" style="display: none; "> 888 Undocumented. 889 </dd> 890 <dd>Method name.</dd> 891 <dd style="display: none; "> 892 This parameter was added in version 893 <b><span></span></b>. 894 You must omit this parameter in earlier versions, 895 and you may omit it in any version. If you require this 896 parameter, the manifest key 897 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 898 can ensure that your extension won't be run in an earlier browser version. 899 </dd> 900 901 <!-- OBJECT PROPERTIES --> 902 <dd style="display: none; "> 903 <dl> 904 <div> 905 <div> 906 </div> 907 </div> 908 </dl> 909 </dd> 910 911 <!-- OBJECT METHODS --> 912 <dd style="display: none; "> 913 <div></div> 914 </dd> 915 916 <!-- OBJECT EVENT FIELDS --> 917 <dd style="display: none; "> 918 <div></div> 919 </dd> 920 921 <!-- FUNCTION PARAMETERS --> 922 <dd style="display: none; "> 923 <div></div> 924 </dd> 925 926 </div> 927 </div><div> 928 <div> 929 <dt> 930 <var>params</var> 931 <em> 932 933 <!-- TYPE --> 934 <div style="display:inline"> 935 ( 936 <span class="optional">optional</span> 937 <span class="enum" style="display: none; ">enumerated</span> 938 <span id="typeTemplate"> 939 <span style="display: none; "> 940 <a> Type</a> 941 </span> 942 <span> 943 <span style="display: none; "> 944 array of <span><span></span></span> 945 </span> 946 <span>object</span> 947 <span style="display: none; "></span> 948 </span> 949 </span> 950 ) 951 </div> 952 953 </em> 954 </dt> 955 <dd class="todo" style="display: none; "> 956 Undocumented. 957 </dd> 958 <dd>JSON object matching Developer Tools / Web Inspector Protocol scheme.</dd> 959 <dd style="display: none; "> 960 This parameter was added in version 961 <b><span></span></b>. 962 You must omit this parameter in earlier versions, 963 and you may omit it in any version. If you require this 964 parameter, the manifest key 965 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 966 can ensure that your extension won't be run in an earlier browser version. 967 </dd> 968 969 <!-- OBJECT PROPERTIES --> 970 <dd> 971 <dl> 972 <div style="display: none; "> 973 <div> 974 </div> 975 </div> 976 </dl> 977 </dd> 978 979 <!-- OBJECT METHODS --> 980 <dd style="display: none; "> 981 <div></div> 982 </dd> 983 984 <!-- OBJECT EVENT FIELDS --> 985 <dd style="display: none; "> 986 <div></div> 987 </dd> 988 989 <!-- FUNCTION PARAMETERS --> 990 <dd style="display: none; "> 991 <div></div> 992 </dd> 993 994 </div> 995 </div><div> 996 <div> 997 <dt> 998 <var>callback</var> 999 <em> 1000 1001 <!-- TYPE --> 1002 <div style="display:inline"> 1003 ( 1004 <span class="optional">optional</span> 1005 <span class="enum" style="display: none; ">enumerated</span> 1006 <span id="typeTemplate"> 1007 <span style="display: none; "> 1008 <a> Type</a> 1009 </span> 1010 <span> 1011 <span style="display: none; "> 1012 array of <span><span></span></span> 1013 </span> 1014 <span>function</span> 1015 <span style="display: none; "></span> 1016 </span> 1017 </span> 1018 ) 1019 </div> 1020 1021 </em> 1022 </dt> 1023 <dd class="todo" style="display: none; "> 1024 Undocumented. 1025 </dd> 1026 <dd>Request response body. If an error occurs while posting the message, the callback will be called with no arguments and <a href="extension.html#property-lastError">chrome.extension.lastError</a> will be set to the error message.</dd> 1027 <dd style="display: none; "> 1028 This parameter was added in version 1029 <b><span></span></b>. 1030 You must omit this parameter in earlier versions, 1031 and you may omit it in any version. If you require this 1032 parameter, the manifest key 1033 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1034 can ensure that your extension won't be run in an earlier browser version. 1035 </dd> 1036 1037 <!-- OBJECT PROPERTIES --> 1038 <dd style="display: none; "> 1039 <dl> 1040 <div> 1041 <div> 1042 </div> 1043 </div> 1044 </dl> 1045 </dd> 1046 1047 <!-- OBJECT METHODS --> 1048 <dd style="display: none; "> 1049 <div></div> 1050 </dd> 1051 1052 <!-- OBJECT EVENT FIELDS --> 1053 <dd style="display: none; "> 1054 <div></div> 1055 </dd> 1056 1057 <!-- FUNCTION PARAMETERS --> 1058 <dd style="display: none; "> 1059 <div></div> 1060 </dd> 1061 1062 </div> 1063 </div> 1064 </dl> 1065 1066 <!-- RETURNS --> 1067 <h4 style="display: none; ">Returns</h4> 1068 <dl> 1069 <div style="display: none; "> 1070 <div> 1071 </div> 1072 </div> 1073 </dl> 1074 1075 <!-- CALLBACK --> 1076 <div> 1077 <div> 1078 <h4>Callback function</h4> 1079 <p style="display: none; "> 1080 The callback <em>parameter</em> should specify a function 1081 that looks like this: 1082 </p> 1083 <p> 1084 If you specify the <em>callback</em> parameter, it should 1085 specify a function that looks like this: 1086 </p> 1087 1088 <!-- Note: intentionally longer 80 columns --> 1089 <pre>function(<span>object result</span>) <span class="subdued">{...}</span>;</pre> 1090 <dl> 1091 <div> 1092 <div> 1093 <dt> 1094 <var>result</var> 1095 <em> 1096 1097 <!-- TYPE --> 1098 <div style="display:inline"> 1099 ( 1100 <span class="optional">optional</span> 1101 <span class="enum" style="display: none; ">enumerated</span> 1102 <span id="typeTemplate"> 1103 <span style="display: none; "> 1104 <a> Type</a> 1105 </span> 1106 <span> 1107 <span style="display: none; "> 1108 array of <span><span></span></span> 1109 </span> 1110 <span>object</span> 1111 <span style="display: none; "></span> 1112 </span> 1113 </span> 1114 ) 1115 </div> 1116 1117 </em> 1118 </dt> 1119 <dd class="todo" style="display: none; "> 1120 Undocumented. 1121 </dd> 1122 <dd>JSON object with the request response.</dd> 1123 <dd style="display: none; "> 1124 This parameter was added in version 1125 <b><span></span></b>. 1126 You must omit this parameter in earlier versions, 1127 and you may omit it in any version. If you require this 1128 parameter, the manifest key 1129 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1130 can ensure that your extension won't be run in an earlier browser version. 1131 </dd> 1132 1133 <!-- OBJECT PROPERTIES --> 1134 <dd> 1135 <dl> 1136 <div style="display: none; "> 1137 <div> 1138 </div> 1139 </div> 1140 </dl> 1141 </dd> 1142 1143 <!-- OBJECT METHODS --> 1144 <dd style="display: none; "> 1145 <div></div> 1146 </dd> 1147 1148 <!-- OBJECT EVENT FIELDS --> 1149 <dd style="display: none; "> 1150 <div></div> 1151 </dd> 1152 1153 <!-- FUNCTION PARAMETERS --> 1154 <dd style="display: none; "> 1155 <div></div> 1156 </dd> 1157 1158 </div> 1159 </div> 1160 </dl> 1161 </div> 1162 </div> 1163 1164 <!-- MIN_VERSION --> 1165 <p style="display: none; "> 1166 This function was added in version <b><span></span></b>. 1167 If you require this function, the manifest key 1168 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1169 can ensure that your extension won't be run in an earlier browser version. 1170 </p> 1171 </div> <!-- /description --> 1172 1173 </div> <!-- /apiItem --> 1174 1175 </div> <!-- /apiGroup --> 1176 1177 <!-- EVENTS --> 1178 <div id="eventsTemplate" class="apiGroup"> 1179 <a name="global-events"></a> 1180 <h3>Events</h3> 1181 <!-- iterates over all events --> 1182 <div class="apiItem"> 1183 <a name="event-onDetach"></a> 1184 <h4>onDetach</h4> 1185 1186 <div class="summary"> 1187 <!-- Note: intentionally longer 80 columns --> 1188 <span class="subdued">chrome.experimental.debugger.</span><span>onDetach</span><span class="subdued">.addListener</span>(function(<span>integer tabId</span>) <span class="subdued">{...}</span>); 1189 </div> 1190 1191 <div class="description"> 1192 <p class="todo" style="display: none; ">Undocumented.</p> 1193 <p>Fired when browser terminates debugging session for the tab.</p> 1194 1195 <!-- PARAMETERS --> 1196 <div> 1197 <h4>Parameters</h4> 1198 <dl> 1199 <div> 1200 <div> 1201 <dt> 1202 <var>tabId</var> 1203 <em> 1204 1205 <!-- TYPE --> 1206 <div style="display:inline"> 1207 ( 1208 <span class="optional" style="display: none; ">optional</span> 1209 <span class="enum" style="display: none; ">enumerated</span> 1210 <span id="typeTemplate"> 1211 <span style="display: none; "> 1212 <a> Type</a> 1213 </span> 1214 <span> 1215 <span style="display: none; "> 1216 array of <span><span></span></span> 1217 </span> 1218 <span>integer</span> 1219 <span style="display: none; "></span> 1220 </span> 1221 </span> 1222 ) 1223 </div> 1224 1225 </em> 1226 </dt> 1227 <dd class="todo" style="display: none; "> 1228 Undocumented. 1229 </dd> 1230 <dd>The id of the tab that was detached.</dd> 1231 <dd style="display: none; "> 1232 This parameter was added in version 1233 <b><span></span></b>. 1234 You must omit this parameter in earlier versions, 1235 and you may omit it in any version. If you require this 1236 parameter, the manifest key 1237 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1238 can ensure that your extension won't be run in an earlier browser version. 1239 </dd> 1240 1241 <!-- OBJECT PROPERTIES --> 1242 <dd style="display: none; "> 1243 <dl> 1244 <div> 1245 <div> 1246 </div> 1247 </div> 1248 </dl> 1249 </dd> 1250 1251 <!-- OBJECT METHODS --> 1252 <dd style="display: none; "> 1253 <div></div> 1254 </dd> 1255 1256 <!-- OBJECT EVENT FIELDS --> 1257 <dd style="display: none; "> 1258 <div></div> 1259 </dd> 1260 1261 <!-- FUNCTION PARAMETERS --> 1262 <dd style="display: none; "> 1263 <div></div> 1264 </dd> 1265 1266 </div> 1267 </div> 1268 </dl> 1269 </div> 1270 </div> <!-- /decription --> 1271 1272 </div><div class="apiItem"> 1273 <a name="event-onEvent"></a> 1274 <h4>onEvent</h4> 1275 1276 <div class="summary"> 1277 <!-- Note: intentionally longer 80 columns --> 1278 <span class="subdued">chrome.experimental.debugger.</span><span>onEvent</span><span class="subdued">.addListener</span>(function(<span>integer tabId, string method, object params</span>) <span class="subdued">{...}</span>); 1279 </div> 1280 1281 <div class="description"> 1282 <p class="todo" style="display: none; ">Undocumented.</p> 1283 <p>Fired whenever debugger issues instrumentation event.</p> 1284 1285 <!-- PARAMETERS --> 1286 <div> 1287 <h4>Parameters</h4> 1288 <dl> 1289 <div> 1290 <div> 1291 <dt> 1292 <var>tabId</var> 1293 <em> 1294 1295 <!-- TYPE --> 1296 <div style="display:inline"> 1297 ( 1298 <span class="optional" style="display: none; ">optional</span> 1299 <span class="enum" style="display: none; ">enumerated</span> 1300 <span id="typeTemplate"> 1301 <span style="display: none; "> 1302 <a> Type</a> 1303 </span> 1304 <span> 1305 <span style="display: none; "> 1306 array of <span><span></span></span> 1307 </span> 1308 <span>integer</span> 1309 <span style="display: none; "></span> 1310 </span> 1311 </span> 1312 ) 1313 </div> 1314 1315 </em> 1316 </dt> 1317 <dd class="todo" style="display: none; "> 1318 Undocumented. 1319 </dd> 1320 <dd>The id of the tab that generated debug evet.</dd> 1321 <dd style="display: none; "> 1322 This parameter was added in version 1323 <b><span></span></b>. 1324 You must omit this parameter in earlier versions, 1325 and you may omit it in any version. If you require this 1326 parameter, the manifest key 1327 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1328 can ensure that your extension won't be run in an earlier browser version. 1329 </dd> 1330 1331 <!-- OBJECT PROPERTIES --> 1332 <dd style="display: none; "> 1333 <dl> 1334 <div> 1335 <div> 1336 </div> 1337 </div> 1338 </dl> 1339 </dd> 1340 1341 <!-- OBJECT METHODS --> 1342 <dd style="display: none; "> 1343 <div></div> 1344 </dd> 1345 1346 <!-- OBJECT EVENT FIELDS --> 1347 <dd style="display: none; "> 1348 <div></div> 1349 </dd> 1350 1351 <!-- FUNCTION PARAMETERS --> 1352 <dd style="display: none; "> 1353 <div></div> 1354 </dd> 1355 1356 </div> 1357 </div><div> 1358 <div> 1359 <dt> 1360 <var>method</var> 1361 <em> 1362 1363 <!-- TYPE --> 1364 <div style="display:inline"> 1365 ( 1366 <span class="optional" style="display: none; ">optional</span> 1367 <span class="enum" style="display: none; ">enumerated</span> 1368 <span id="typeTemplate"> 1369 <span style="display: none; "> 1370 <a> Type</a> 1371 </span> 1372 <span> 1373 <span style="display: none; "> 1374 array of <span><span></span></span> 1375 </span> 1376 <span>string</span> 1377 <span style="display: none; "></span> 1378 </span> 1379 </span> 1380 ) 1381 </div> 1382 1383 </em> 1384 </dt> 1385 <dd class="todo" style="display: none; "> 1386 Undocumented. 1387 </dd> 1388 <dd>Method name.</dd> 1389 <dd style="display: none; "> 1390 This parameter was added in version 1391 <b><span></span></b>. 1392 You must omit this parameter in earlier versions, 1393 and you may omit it in any version. If you require this 1394 parameter, the manifest key 1395 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1396 can ensure that your extension won't be run in an earlier browser version. 1397 </dd> 1398 1399 <!-- OBJECT PROPERTIES --> 1400 <dd style="display: none; "> 1401 <dl> 1402 <div> 1403 <div> 1404 </div> 1405 </div> 1406 </dl> 1407 </dd> 1408 1409 <!-- OBJECT METHODS --> 1410 <dd style="display: none; "> 1411 <div></div> 1412 </dd> 1413 1414 <!-- OBJECT EVENT FIELDS --> 1415 <dd style="display: none; "> 1416 <div></div> 1417 </dd> 1418 1419 <!-- FUNCTION PARAMETERS --> 1420 <dd style="display: none; "> 1421 <div></div> 1422 </dd> 1423 1424 </div> 1425 </div><div> 1426 <div> 1427 <dt> 1428 <var>params</var> 1429 <em> 1430 1431 <!-- TYPE --> 1432 <div style="display:inline"> 1433 ( 1434 <span class="optional">optional</span> 1435 <span class="enum" style="display: none; ">enumerated</span> 1436 <span id="typeTemplate"> 1437 <span style="display: none; "> 1438 <a> Type</a> 1439 </span> 1440 <span> 1441 <span style="display: none; "> 1442 array of <span><span></span></span> 1443 </span> 1444 <span>object</span> 1445 <span style="display: none; "></span> 1446 </span> 1447 </span> 1448 ) 1449 </div> 1450 1451 </em> 1452 </dt> 1453 <dd class="todo" style="display: none; "> 1454 Undocumented. 1455 </dd> 1456 <dd>JSON object matching Developer Tools / Web Inspector Protocol event data scheme.</dd> 1457 <dd style="display: none; "> 1458 This parameter was added in version 1459 <b><span></span></b>. 1460 You must omit this parameter in earlier versions, 1461 and you may omit it in any version. If you require this 1462 parameter, the manifest key 1463 <a href="manifest.html#minimum_chrome_version">minimum_chrome_version</a> 1464 can ensure that your extension won't be run in an earlier browser version. 1465 </dd> 1466 1467 <!-- OBJECT PROPERTIES --> 1468 <dd> 1469 <dl> 1470 <div style="display: none; "> 1471 <div> 1472 </div> 1473 </div> 1474 </dl> 1475 </dd> 1476 1477 <!-- OBJECT METHODS --> 1478 <dd style="display: none; "> 1479 <div></div> 1480 </dd> 1481 1482 <!-- OBJECT EVENT FIELDS --> 1483 <dd style="display: none; "> 1484 <div></div> 1485 </dd> 1486 1487 <!-- FUNCTION PARAMETERS --> 1488 <dd style="display: none; "> 1489 <div></div> 1490 </dd> 1491 1492 </div> 1493 </div> 1494 </dl> 1495 </div> 1496 </div> <!-- /decription --> 1497 1498 </div> <!-- /apiItem --> 1499 1500 </div> <!-- /apiGroup --> 1501 1502 <!-- TYPES --> 1503 <div class="apiGroup" style="display: none; "> 1504 <a name="types"></a> 1505 <h3 id="types">Types</h3> 1506 1507 <!-- iterates over all types --> 1508 <div class="apiItem"> 1509 <a></a> 1510 <h4>type name</h4> 1511 1512 <div> 1513 </div> 1514 1515 </div> <!-- /apiItem --> 1516 1517 </div> <!-- /apiGroup --> 1518 1519 </div> <!-- /apiPage --> 1520 </div> <!-- /gc-pagecontent --> 1521 </div> <!-- /g-section --> 1522 </div> <!-- /codesiteContent --> 1523 <div id="gc-footer" --=""> 1524 <div class="text"> 1525 <p> 1526 Except as otherwise <a href="http://code.google.com/policies.html#restrictions">noted</a>, 1527 the content of this page is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by/3.0/">Creative Commons 1528 Attribution 3.0 License</a>, and code samples are licensed under the 1529 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD License</a>. 1530 </p> 1531 <p> 1532 2011 Google 1533 </p> 1534 1535 <!-- begin analytics --> 1536 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script> 1537 <script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script> 1538 1539 <script type="text/javascript"> 1540 // chrome doc tracking 1541 try { 1542 var engdocs = _gat._getTracker("YT-10763712-2"); 1543 engdocs._trackPageview(); 1544 } catch(err) {} 1545 1546 // code.google.com site-wide tracking 1547 try { 1548 _uacct="UA-18071-1"; 1549 _uanchor=1; 1550 _uff=0; 1551 urchinTracker(); 1552 } 1553 catch(e) {/* urchinTracker not available. */} 1554 </script> 1555 <!-- end analytics --> 1556 </div> 1557 </div> <!-- /gc-footer --> 1558 </div> <!-- /gc-container --> 1559 </body></html> 1560