Home | History | Annotate | Download | only in articles
      1 <h1>chrome.devtools.* APIs</h1>
      2 
      3 <p>
      4 The following API modules provide support for extending
      5 Chrome Developer Tools:
      6 </p>
      7 
      8 <a name="api-list"></a>
      9 <ul>
     10   <li>
     11   <a href="devtools.inspectedWindow.html">devtools.inspectedWindow</a></li><li>
     12   <a href="devtools.network.html">devtools.network</a></li><li>
     13   <a href="devtools.panels.html">devtools.panels</a></li>
     14 </ul>
     15 
     16 <h2 id="using">How to use DevTools APIs</h2>
     17 
     18 <ol>
     19   <li>
     20     Specify the "devtools_page" field in your extension's manifest:
     21 <pre>{
     22   "name": ...
     23   "version": "1.0",
     24   "minimum_chrome_version": "10.0",
     25   <b>"devtools_page": "devtools.html"</b>,
     26   ...
     27 }
     28 </pre>
     29   </li>
     30   <li>
     31     An instance of the devtools_page specified in your extension's manifest
     32     will be created for every Developer Tools window opened. The page may add
     33     other extension pages as panels and sidebars to the Developer Tools window
     34     using <a href="devtools.panels.html">devtools.panels</a>
     35     API.
     36   </li>
     37   <li>
     38     The chrome.devtools.* API modules are available only to the
     39     pages loaded within the Developer Tools window. Content scripts and other
     40     extension pages do not have these APIs. Thus, the APIs are available only
     41     through the lifetime of the Developer Tools window.
     42   </li>
     43   <li>The APIs available to extension pages within the Developer Tools
     44     window include all <a href="#api-list">devtools modules
     45     listed above</a> and <a href="extension.html">chrome.extension</a> API.
     46     Other extension APIs are not available to the Developer Tools pages, but
     47     you may invoke them by sending a request to the background page of your
     48     extension, similarly to how it's done in the
     49     <a href="overview.html#contentScripts">content scripts</a>.
     50   </li><li>
     51     There are also some Developer Tools APIs that are still experimental.
     52     Please refer to <a href="experimental.html">chrome.experimental.* APIs</a>
     53     for the list of experimental APIs and guidelines on how to use them.
     54   </li>
     55   <li>
     56     <a href="http://groups.google.com/group/google-chrome-developer-tools/topics">Give us feedback!</a>
     57     Your comments and suggestions help us improve the APIs.
     58   </li>
     59 </ol>
     60 
     61 <h2 id="other">More information</h2>
     62 
     63 <p>
     64 For information on the standard APIs that extensions can use, see
     65 <a href="api_index.html">chrome.* APIs</a> and
     66 <a href="api_other.html">Other APIs</a>.
     67 </p>
     68 
     69 <h2 id="examples">Examples</h2>
     70 
     71 <p>
     72 You can find examples that use Developer Tools APIs in
     73 <a href="samples.html#devtools">Samples</a>.
     74 </p>
     75