OLD | NEW |
| (Empty) |
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/jstempla
te_compiled.js"> | |
15 </script> | |
16 <script type="text/javascript" src="../../../../third_party/json_minify/mini
fy-sans-regexp.js"> | |
17 </script> | |
18 <script type="text/javascript" src="js/api_page_generator.js"></script> | |
19 <script type="text/javascript" src="js/bootstrap.js"></script> | |
20 <script type="text/javascript" src="js/sidebar.js"></script> | |
21 <meta name="description" content="Documentation for the chrome.devtools.panels
module, which is part of the Google Chrome extension APIs."><title>chrome.devt
ools.panels - Google Chrome Extensions - Google Code</title></head> | |
22 <body> <div id="devModeWarning" class="displayModeWarning"> | |
23 You are viewing extension docs in chrome via the 'file:' scheme: are you exp
ecting to see local changes when you refresh? You'll need run chrome with --allo
w-file-access-from-files. | |
24 </div> | |
25 <div id="branchWarning" class="displayModeWarning"> | |
26 <span>WARNING: This is the <span id="branchName">BETA</span> documentation. | |
27 It may not work with the stable release of Chrome.</span> | |
28 <select id="branchChooser"> | |
29 <option>Choose a different version... | |
30 </option><option value="">Stable | |
31 </option><option value="beta">Beta | |
32 </option><option value="dev">Dev | |
33 </option><option value="trunk">Trunk | |
34 </option></select> | |
35 </div> | |
36 <div id="unofficialWarning" class="displayModeWarning"> | |
37 <span>WARNING: This is unofficial documentation. It may not work with the | |
38 current release of Chrome.</span> | |
39 <button id="goToOfficialDocs">Go to the official docs</button> | |
40 </div> | |
41 <div id="gc-container" class="labs"> | |
42 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | |
43 <!-- In particular, sub-templates that recurse, must be used by allowing | |
44 jstemplate to make a copy of the template in this section which | |
45 are not operated on by way of the jsskip="true" --> | |
46 <!-- /SUBTEMPLATES --> | |
47 <a id="top"></a> | |
48 <div id="skipto"> | |
49 <a href="#gc-pagecontent">Skip to page content</a> | |
50 <a href="#gc-toc">Skip to main navigation</a> | |
51 </div> | |
52 <!-- API HEADER --> | |
53 <table id="header" width="100%" cellspacing="0" border="0"> | |
54 <tbody><tr> | |
55 <td valign="middle"><a href="http://code.google.com/"><img src="images/c
ode_labs_logo.gif" height="43" width="161" alt="Google Code Labs" style="border:
0; margin:0;"></a></td> | |
56 <td valign="middle" width="100%" style="padding-left:0.6em;"> | |
57 <form action="http://www.google.com/cse" id="cse" style="margin-top:0.
5em"> | |
58 <div id="gsc-search-box"> | |
59 <input type="hidden" name="cx" value="002967670403910741006:61_cvz
fqtno"> | |
60 <input type="hidden" name="ie" value="UTF-8"> | |
61 <input type="text" name="q" value="" size="55"> | |
62 <input class="gsc-search-button" type="submit" name="sa" value="Se
arch"> | |
63 <br> | |
64 <span class="greytext">e.g. "page action" or "tabs"</span> | |
65 </div> | |
66 </form> | |
67 <script type="text/javascript" src="https://www.google.com/jsapi"></sc
ript> | |
68 <script type="text/javascript">google.load("elements", "1", {packages:
"transliteration"});</script> | |
69 <script type="text/javascript" src="https://www.google.com/coop/cse/t1
3n?form=cse&t13n_langs=en"></script> | |
70 <script type="text/javascript" src="https://www.google.com/coop/cse/br
and?form=cse&lang=en"></script> | |
71 </td> | |
72 </tr> | |
73 </tbody></table> | |
74 <div id="codesiteContent" class=""> | |
75 <a id="gc-topnav-anchor"></a> | |
76 <div id="gc-topnav"> | |
77 <h1>Google Chrome Extensions (<a href="http://code.google.com/labs/">Lab
s</a>)</h1> | |
78 <ul id="home" class="gc-topnav-tabs"> | |
79 <li id="home_link"> | |
80 <a href="index.html" title="Google Chrome Extensions home page">Home
</a> | |
81 </li> | |
82 <li id="docs_link"> | |
83 <a href="docs.html" title="Official Google Chrome Extensions documen
tation">Docs</a> | |
84 </li> | |
85 <li id="faq_link"> | |
86 <a href="faq.html" title="Answers to frequently asked questions abou
t Google Chrome Extensions">FAQ</a> | |
87 </li> | |
88 <li id="samples_link"> | |
89 <a href="samples.html" title="Sample extensions (with source code)">
Samples</a> | |
90 </li> | |
91 <li id="group_link"> | |
92 <a href="http://groups.google.com/a/chromium.org/group/chromium-exte
nsions" title="Google Chrome Extensions developer forum">Group</a> | |
93 </li> | |
94 <li id="so_link"> | |
95 <a href="http://stackoverflow.com/questions/tagged/google-chrome-ext
ension" title="[google-chrome-extension] tag on Stack Overflow">Questions?</a> | |
96 </li> | |
97 </ul> | |
98 </div> <!-- end gc-topnav --> | |
99 <div class="g-section g-tpl-170"> | |
100 <!-- SIDENAV --> | |
101 <div class="g-unit g-first" id="gc-toc"> | |
102 <ul> | |
103 <li><a href="getstarted.html">Getting Started</a></li> | |
104 <li><a href="overview.html">Overview</a></li> | |
105 <li><a href="whats_new.html">What's New?</a></li> | |
106 <li><h2><a href="devguide.html">Developer's Guide</a></h2> | |
107 <ul> | |
108 <li>Browser UI | |
109 <ul> | |
110 <li><a href="browserAction.html">Browser Actions</a></li> | |
111 <li><a href="contextMenus.html">Context Menus</a></li> | |
112 <li><a href="notifications.html">Desktop Notifications</a></li
> | |
113 <li><a href="omnibox.html">Omnibox</a></li> | |
114 <li><a href="options.html">Options Pages</a></li> | |
115 <li><a href="override.html">Override Pages</a></li> | |
116 <li><a href="pageAction.html">Page Actions</a></li> | |
117 </ul> | |
118 </li> | |
119 <li>Browser Interaction | |
120 <ul> | |
121 <li><a href="bookmarks.html">Bookmarks</a></li> | |
122 <li><a href="cookies.html">Cookies</a></li> | |
123 <li><a href="devtools.html">Developer Tools</a></li> | |
124 <li><a href="events.html">Events</a></li> | |
125 <li><a href="history.html">History</a></li> | |
126 <li><a href="management.html">Management</a></li> | |
127 <li><a href="tabs.html">Tabs</a></li> | |
128 <li><a href="windows.html">Windows</a></li> | |
129 </ul> | |
130 </li> | |
131 <li>Implementation | |
132 <ul> | |
133 <li><a href="a11y.html">Accessibility</a></li> | |
134 <li><a href="background_pages.html">Background Pages</a></li> | |
135 <li><a href="content_scripts.html">Content Scripts</a></li> | |
136 <li><a href="xhr.html">Cross-Origin XHR</a></li> | |
137 <li><a href="i18n.html">Internationalization</a></li> | |
138 <li><a href="messaging.html">Message Passing</a></li> | |
139 <li><a href="permissions.html">Optional Permissions</a></li> | |
140 <li><a href="npapi.html">NPAPI Plugins</a></li> | |
141 </ul> | |
142 </li> | |
143 <li>Finishing | |
144 <ul> | |
145 <li><a href="hosting.html">Hosting</a></li> | |
146 <li><a href="external_extensions.html">Other Deployment Option
s</a></li> | |
147 </ul> | |
148 </li> | |
149 </ul> | |
150 </li> | |
151 <li><h2><a href="apps.html">Packaged Apps</a></h2></li> | |
152 <li><h2><a href="tutorials.html">Tutorials</a></h2> | |
153 <ul> | |
154 <li><a href="tut_debugging.html">Debugging</a></li> | |
155 <li><a href="tut_analytics.html">Google Analytics</a></li> | |
156 <li><a href="tut_oauth.html">OAuth</a></li> | |
157 </ul> | |
158 </li> | |
159 <li><h2>Reference</h2> | |
160 <ul> | |
161 <li>Formats | |
162 <ul> | |
163 <li><a href="manifest.html">Manifest Files</a></li> | |
164 <li><a href="match_patterns.html">Match Patterns</a></li> | |
165 </ul> | |
166 </li> | |
167 <li><a href="permission_warnings.html">Permission Warnings</a></li
> | |
168 <li><a href="api_index.html">chrome.* APIs</a></li> | |
169 <li><a href="api_other.html">Other APIs</a></li> | |
170 </ul> | |
171 </li> | |
172 <li><h2><a href="samples.html">Samples</a></h2></li> | |
173 <div class="line"> </div> | |
174 <li><h2>More</h2> | |
175 <ul> | |
176 <li><a href="http://code.google.com/chrome/webstore/docs/index.htm
l">Chrome Web Store</a></li> | |
177 <li><a href="http://code.google.com/chrome/apps/docs/developers_gu
ide.html">Hosted Apps</a></li> | |
178 <li><a href="themes.html">Themes</a></li> | |
179 </ul> | |
180 </li> | |
181 </ul> | |
182 </div> | |
183 <script> | |
184 initToggles(); | |
185 </script> | |
186 <div class="g-unit" id="gc-pagecontent"> | |
187 <div id="pageTitle"> | |
188 <h1 class="page_title">chrome.devtools.panels</h1> | |
189 </div> | |
190 <!-- TABLE OF CONTENTS --> | |
191 <div id="toc"> | |
192 <h2>Contents</h2> | |
193 <ol> | |
194 <li> | |
195 <a href="#H2-0">Overview</a> | |
196 <ol> | |
197 </ol> | |
198 </li><li> | |
199 <a href="#overview-examples">Examples</a> | |
200 <ol> | |
201 </ol> | |
202 </li> | |
203 <li> | |
204 <a href="#apiReference">API reference: chrome.devtools.panels</a
> | |
205 <ol> | |
206 <li> | |
207 <a href="#properties">Properties</a> | |
208 <ol> | |
209 <li> | |
210 <a href="#property-elements">elements</a> | |
211 </li> | |
212 </ol> | |
213 </li> | |
214 <li> | |
215 <a href="#global-methods">Methods</a> | |
216 <ol> | |
217 <li> | |
218 <a href="#method-create">create</a> | |
219 </li><li> | |
220 <a href="#method-setOpenResourceHandler">setOpenResourceHandler<
/a> | |
221 </li> | |
222 </ol> | |
223 </li> | |
224 <li> | |
225 <a href="#types">Types</a> | |
226 <ol> | |
227 <li> | |
228 <a href="#type-ElementsPanel">ElementsPanel</a> | |
229 <ol> | |
230 <li> | |
231 <a href="#global-ElementsPanel-methods">Methods</a> | |
232 <ol> | |
233 <li> | |
234 <a href="#method-ElementsPanel-createSidebarPane">createSidebarP
ane</a> | |
235 </li> | |
236 </ol> | |
237 </li> | |
238 <li> | |
239 <a href="#global-ElementsPanel-events">Events</a> | |
240 <ol> | |
241 <li> | |
242 <a href="#event-ElementsPanel-onSelectionChanged">onSelectionCha
nged</a> | |
243 </li> | |
244 </ol> | |
245 </li> | |
246 </ol> | |
247 </li><li> | |
248 <a href="#type-ExtensionPanel">ExtensionPanel</a> | |
249 <ol> | |
250 <li> | |
251 <a href="#global-ExtensionPanel-methods">Methods</a> | |
252 <ol> | |
253 <li> | |
254 <a href="#method-ExtensionPanel-createStatusBarButton">createSta
tusBarButton</a> | |
255 </li> | |
256 </ol> | |
257 </li> | |
258 <li> | |
259 <a href="#global-ExtensionPanel-events">Events</a> | |
260 <ol> | |
261 <li> | |
262 <a href="#event-ExtensionPanel-onHidden">onHidden</a> | |
263 </li><li> | |
264 <a href="#event-ExtensionPanel-onSearch">onSearch</a> | |
265 </li><li> | |
266 <a href="#event-ExtensionPanel-onShown">onShown</a> | |
267 </li> | |
268 </ol> | |
269 </li> | |
270 </ol> | |
271 </li><li> | |
272 <a href="#type-ExtensionSidebarPane">ExtensionSidebarPane</a> | |
273 <ol> | |
274 <li> | |
275 <a href="#global-ExtensionSidebarPane-methods">Methods</a> | |
276 <ol> | |
277 <li> | |
278 <a href="#method-ExtensionSidebarPane-setExpression">setExpressi
on</a> | |
279 </li><li> | |
280 <a href="#method-ExtensionSidebarPane-setHeight">setHeight</a> | |
281 </li><li> | |
282 <a href="#method-ExtensionSidebarPane-setObject">setObject</a> | |
283 </li><li> | |
284 <a href="#method-ExtensionSidebarPane-setPage">setPage</a> | |
285 </li> | |
286 </ol> | |
287 </li> | |
288 <li> | |
289 <a href="#global-ExtensionSidebarPane-events">Events</a> | |
290 <ol> | |
291 <li> | |
292 <a href="#event-ExtensionSidebarPane-onHidden">onHidden</a> | |
293 </li><li> | |
294 <a href="#event-ExtensionSidebarPane-onShown">onShown</a> | |
295 </li> | |
296 </ol> | |
297 </li> | |
298 </ol> | |
299 </li><li> | |
300 <a href="#type-Button">Button</a> | |
301 <ol> | |
302 <li> | |
303 <a href="#global-Button-methods">Methods</a> | |
304 <ol> | |
305 <li> | |
306 <a href="#method-Button-update">update</a> | |
307 </li> | |
308 </ol> | |
309 </li> | |
310 <li> | |
311 <a href="#global-Button-events">Events</a> | |
312 <ol> | |
313 <li> | |
314 <a href="#event-Button-onClicked">onClicked</a> | |
315 </li> | |
316 </ol> | |
317 </li> | |
318 </ol> | |
319 </li> | |
320 </ol> | |
321 </li> | |
322 </ol> | |
323 </li> | |
324 </ol> | |
325 </div> | |
326 <!-- /TABLE OF CONTENTS --> | |
327 <!-- Standard content lead-in for experimental API pages --> | |
328 <!-- STATIC CONTENT PLACEHOLDER --> | |
329 <div id="static"><!-- BEGIN AUTHORED CONTENT --> | |
330 <p id="classSummary"> | |
331 Use the <code>chrome.devtools.panels</code> module to integrate | |
332 your extension into Developer Tools window UI: create your own panels, access | |
333 existing panels, and add sidebars. | |
334 </p><p> | |
335 See <a href="devtools.html">DevTools APIs summary</a> for | |
336 general introduction to using Developer Tools APIs. | |
337 </p> | |
338 <a name="H2-0"></a><h2>Overview</h2> | |
339 <p> | |
340 Each extension panel and sidebar is displayed as a separate HTML page. All | |
341 extension pages displayed in the Developer Tools window have access to all | |
342 modules in <code>chrome.devtools</code> API, as well as to | |
343 <a href="extension.html">chrome.extension</a> API. Other extension APIs are not | |
344 available to the pages within Developer Tools window, but you may invoke them | |
345 by sending a request to the background page of your extension, similarly to how | |
346 it's done in the <a href="overview.html#contentScripts">content scripts</a>. | |
347 </p><p> | |
348 You can use the <code><a href="#method-setOpenResourceHandler">setOpenResourceHa
ndler()</a></code> method to install a | |
349 callback function that handles user requests to open a resource (typically, | |
350 a click on a resource link in the Developer Tools window). At most one of the | |
351 installed handlers gets called; users can specify (using the Developer Tools | |
352 Settings dialog) either the default behavior or an extension to handle resource | |
353 open requests. If an extension calls <code>setOpenResourceHandler()</code> | |
354 multiple times, only the last handler is retained. | |
355 </p> | |
356 <h2 id="overview-examples">Examples</h2> | |
357 <p>The following code adds a panel contained in <code>Panel.html</code>, | |
358 represented by <code>FontPicker.png</code> on the Developer Tools toolbar | |
359 and labeled as <em>Font Picker</em>:</p> | |
360 <pre>chrome.devtools.panels.create("Font Picker", | |
361 "FontPicker.png", | |
362 "Panel.html" | |
363 function(panel) { ... }); | |
364 </pre> | |
365 <p>The following code adds a sidebar pane contained in | |
366 <code>Sidebar.html</code> and titled <em>Font Properties</em> to the Elements | |
367 panel, then sets its height to <code>8ex</code>: | |
368 </p><pre>chrome.devtools.panels.elements.createSidebarPane("Font Properties", | |
369 function(sidebar) { | |
370 sidebar.setPage("Sidebar.html"); | |
371 sidebar.setHeight("8ex"); | |
372 }); | |
373 </pre> | |
374 <p> | |
375 This screenshot demonstrates the effect the above examples would have on | |
376 Developer Tools window: | |
377 <img src="images/devtools-panels.png" style="margin-left: 20px" width="686" heig
ht="289" alt="Extension icon panel on DevTools toolbar"> | |
378 </p> | |
379 <p> | |
380 You can find examples that use this API in | |
381 <a href="samples.html#Chrome Query">Samples</a>. | |
382 </p> | |
383 <!-- END AUTHORED CONTENT --> | |
384 </div> | |
385 <!-- API PAGE --> | |
386 <div class="apiPage"> | |
387 <a name="apiReference"></a> | |
388 <h2>API reference: chrome.devtools.panels</h2> | |
389 <!-- PROPERTIES --> | |
390 <div class="apiGroup"> | |
391 <a name="properties"></a> | |
392 <h3 id="properties">Properties</h3> | |
393 <div> | |
394 <a name="property-elements"></a> | |
395 <h4>elements</h4> | |
396 <div class="summary"> | |
397 <!-- Note: intentionally longer 80 columns --> | |
398 <span>chrome.devtools.panels.</span><span>elements</span> | |
399 </div> | |
400 <div> | |
401 <dt> | |
402 <var>elements</var> | |
403 <em> | |
404 <!-- TYPE --> | |
405 <div style="display:inline"> | |
406 ( | |
407 <span id="typeTemplate"> | |
408 <span> | |
409 <a href="devtools.panels.html#type-ElementsPanel">Elemen
tsPanel</a> | |
410 </span> | |
411 </span> | |
412 ) | |
413 </div> | |
414 </em> | |
415 </dt> | |
416 <dd>Elements panel.</dd> | |
417 <!-- OBJECT PROPERTIES --> | |
418 <!-- OBJECT METHODS --> | |
419 <!-- OBJECT EVENT FIELDS --> | |
420 <!-- FUNCTION PARAMETERS --> | |
421 </div> | |
422 </div> | |
423 </div> <!-- /apiGroup --> | |
424 <!-- METHODS --> | |
425 <div id="methodsTemplate" class="apiGroup"> | |
426 <a name="global-methods"></a> | |
427 <h3>Methods</h3> | |
428 <!-- iterates over all functions --> | |
429 <div class="apiItem"> | |
430 <a name="method-create"></a> <!-- method-anchor --> | |
431 <h4>create</h4> | |
432 <div class="summary"> | |
433 <!-- Note: intentionally longer 80 columns --> | |
434 <span>chrome.devtools.panels.create</span>(<span class="null">
<span>string</span> | |
435 <var><span>title</span></var></span><span class="null"><sp
an>, </span><span>string</span> | |
436 <var><span>iconPath</span></var></span><span class="null">
<span>, </span><span>string</span> | |
437 <var><span>pagePath</span></var></span><span class="option
al"><span>, </span><span>function</span> | |
438 <var><span>callback</span></var></span>)</div> | |
439 <div class="description"> | |
440 <p>Creates an extension panel.</p> | |
441 <!-- PARAMETERS --> | |
442 <h4>Parameters</h4> | |
443 <dl> | |
444 <div> | |
445 <div> | |
446 <dt> | |
447 <var>title</var> | |
448 <em> | |
449 <!-- TYPE --> | |
450 <div style="display:inline"> | |
451 ( | |
452 <span id="typeTemplate"> | |
453 <span> | |
454 <span>string</span> | |
455 </span> | |
456 </span> | |
457 ) | |
458 </div> | |
459 </em> | |
460 </dt> | |
461 <dd>Title that is displayed next to the extension icon in the Develope
r Tools toolbar.</dd> | |
462 <!-- OBJECT PROPERTIES --> | |
463 <!-- OBJECT METHODS --> | |
464 <!-- OBJECT EVENT FIELDS --> | |
465 <!-- FUNCTION PARAMETERS --> | |
466 </div> | |
467 </div><div> | |
468 <div> | |
469 <dt> | |
470 <var>iconPath</var> | |
471 <em> | |
472 <!-- TYPE --> | |
473 <div style="display:inline"> | |
474 ( | |
475 <span id="typeTemplate"> | |
476 <span> | |
477 <span>string</span> | |
478 </span> | |
479 </span> | |
480 ) | |
481 </div> | |
482 </em> | |
483 </dt> | |
484 <dd>Path of the panel's icon relative to the extension directory.</dd> | |
485 <!-- OBJECT PROPERTIES --> | |
486 <!-- OBJECT METHODS --> | |
487 <!-- OBJECT EVENT FIELDS --> | |
488 <!-- FUNCTION PARAMETERS --> | |
489 </div> | |
490 </div><div> | |
491 <div> | |
492 <dt> | |
493 <var>pagePath</var> | |
494 <em> | |
495 <!-- TYPE --> | |
496 <div style="display:inline"> | |
497 ( | |
498 <span id="typeTemplate"> | |
499 <span> | |
500 <span>string</span> | |
501 </span> | |
502 </span> | |
503 ) | |
504 </div> | |
505 </em> | |
506 </dt> | |
507 <dd>Path of the panel's HTML page relative to the extension directory.
</dd> | |
508 <!-- OBJECT PROPERTIES --> | |
509 <!-- OBJECT METHODS --> | |
510 <!-- OBJECT EVENT FIELDS --> | |
511 <!-- FUNCTION PARAMETERS --> | |
512 </div> | |
513 </div><div> | |
514 <div> | |
515 <dt> | |
516 <var>callback</var> | |
517 <em> | |
518 <!-- TYPE --> | |
519 <div style="display:inline"> | |
520 ( | |
521 <span class="optional">optional</span> | |
522 <span id="typeTemplate"> | |
523 <span> | |
524 <span>function</span> | |
525 </span> | |
526 </span> | |
527 ) | |
528 </div> | |
529 </em> | |
530 </dt> | |
531 <dd>A function that is called when the panel is created.</dd> | |
532 <!-- OBJECT PROPERTIES --> | |
533 <!-- OBJECT METHODS --> | |
534 <!-- OBJECT EVENT FIELDS --> | |
535 <!-- FUNCTION PARAMETERS --> | |
536 </div> | |
537 </div> | |
538 </dl> | |
539 <!-- RETURNS --> | |
540 <dl> | |
541 </dl> | |
542 <!-- CALLBACK --> | |
543 <div> | |
544 <div> | |
545 <h4>Callback function</h4> | |
546 <p> | |
547 If you specify the <em>callback</em> parameter, it should | |
548 specify a function that looks like this: | |
549 </p> | |
550 <!-- Note: intentionally longer 80 columns --> | |
551 <pre>function(<span>ExtensionPanel panel</span>) <span class="
subdued">{...}</span>;</pre> | |
552 <dl> | |
553 <div> | |
554 <div> | |
555 <dt> | |
556 <var>panel</var> | |
557 <em> | |
558 <!-- TYPE --> | |
559 <div style="display:inline"> | |
560 ( | |
561 <span id="typeTemplate"> | |
562 <span> | |
563 <a href="devtools.panels.html#type-ExtensionPanel">Exten
sionPanel</a> | |
564 </span> | |
565 </span> | |
566 ) | |
567 </div> | |
568 </em> | |
569 </dt> | |
570 <dd>An ExtensionPanel object representing the created panel.</dd> | |
571 <!-- OBJECT PROPERTIES --> | |
572 <!-- OBJECT METHODS --> | |
573 <!-- OBJECT EVENT FIELDS --> | |
574 <!-- FUNCTION PARAMETERS --> | |
575 </div> | |
576 </div> | |
577 </dl> | |
578 </div> | |
579 </div> | |
580 <!-- MIN_VERSION --> | |
581 </div> <!-- /description --> | |
582 </div><div class="apiItem"> | |
583 <a name="method-setOpenResourceHandler"></a> <!-- method-anchor --
> | |
584 <h4>setOpenResourceHandler</h4> | |
585 <div class="summary"> | |
586 <!-- Note: intentionally longer 80 columns --> | |
587 <span>chrome.devtools.panels.setOpenResourceHandler</span>(<sp
an class="optional"><span>function</span> | |
588 <var><span>callback</span></var></span>)</div> | |
589 <div class="description"> | |
590 <p>Specifies the function to be called when the user clicks a re
source link in the Developer Tools window. To unset the handler, either call the
method with no parameters or pass null as the parameter.</p> | |
591 <!-- PARAMETERS --> | |
592 <h4>Parameters</h4> | |
593 <dl> | |
594 <div> | |
595 <div> | |
596 <dt> | |
597 <var>callback</var> | |
598 <em> | |
599 <!-- TYPE --> | |
600 <div style="display:inline"> | |
601 ( | |
602 <span class="optional">optional</span> | |
603 <span id="typeTemplate"> | |
604 <span> | |
605 <span>function</span> | |
606 </span> | |
607 </span> | |
608 ) | |
609 </div> | |
610 </em> | |
611 </dt> | |
612 <dd>A function that is called when the user clicks on a valid resource
link in Developer Tools window. Note that if the user clicks an invalid URL or
an XHR, this function is not called.</dd> | |
613 <!-- OBJECT PROPERTIES --> | |
614 <!-- OBJECT METHODS --> | |
615 <!-- OBJECT EVENT FIELDS --> | |
616 <!-- FUNCTION PARAMETERS --> | |
617 </div> | |
618 </div> | |
619 </dl> | |
620 <!-- RETURNS --> | |
621 <dl> | |
622 </dl> | |
623 <!-- CALLBACK --> | |
624 <div> | |
625 <div> | |
626 <h4>Callback function</h4> | |
627 <p> | |
628 If you specify the <em>callback</em> parameter, it should | |
629 specify a function that looks like this: | |
630 </p> | |
631 <!-- Note: intentionally longer 80 columns --> | |
632 <pre>function(<span>object devtools.inspectedWindow.Resource</
span>) <span class="subdued">{...}</span>;</pre> | |
633 <dl> | |
634 <div> | |
635 <div> | |
636 <dt> | |
637 <var>devtools.inspectedWindow.Resource</var> | |
638 <em> | |
639 <!-- TYPE --> | |
640 <div style="display:inline"> | |
641 ( | |
642 <span id="typeTemplate"> | |
643 <span> | |
644 <span>object</span> | |
645 </span> | |
646 </span> | |
647 ) | |
648 </div> | |
649 </em> | |
650 </dt> | |
651 <dd>A <a href="devtools.inspectedWindow.html#type-Resource">Resource</
a> object for the resource that was clicked.</dd> | |
652 <!-- OBJECT PROPERTIES --> | |
653 <!-- OBJECT METHODS --> | |
654 <!-- OBJECT EVENT FIELDS --> | |
655 <!-- FUNCTION PARAMETERS --> | |
656 </div> | |
657 </div> | |
658 </dl> | |
659 </div> | |
660 </div> | |
661 <!-- MIN_VERSION --> | |
662 </div> <!-- /description --> | |
663 </div> <!-- /apiItem --> | |
664 </div> <!-- /apiGroup --> | |
665 <!-- EVENTS --> | |
666 <!-- /apiGroup --> | |
667 <!-- TYPES --> | |
668 <div class="apiGroup"> | |
669 <a name="types"></a> | |
670 <h3 id="types">Types</h3> | |
671 <!-- iterates over all types --> | |
672 <div class="apiItem"> | |
673 <a name="type-ElementsPanel"></a> | |
674 <h4>ElementsPanel</h4> | |
675 <div> | |
676 <dt> | |
677 <em> | |
678 <!-- TYPE --> | |
679 <div style="display:inline"> | |
680 ( | |
681 <span id="typeTemplate"> | |
682 <span> | |
683 <span>object</span> | |
684 </span> | |
685 </span> | |
686 ) | |
687 </div> | |
688 </em> | |
689 </dt> | |
690 <dd>Represents the Elements panel.</dd> | |
691 <!-- OBJECT PROPERTIES --> | |
692 <!-- OBJECT METHODS --> | |
693 <dd> | |
694 <div class="apiGroup"> | |
695 <a name="global-ElementsPanel-methods"></a> | |
696 <h3>Methods of ElementsPanel</h3> | |
697 <!-- iterates over all functions --> | |
698 <div class="apiItem"> | |
699 <a name="method-ElementsPanel-createSidebarPane"></a> <!-- method-
anchor --> | |
700 <h4>createSidebarPane</h4> | |
701 <div class="summary"> | |
702 <!-- Note: intentionally longer 80 columns --> | |
703 <span>elementsPanel.createSidebarPane</span>(<span class="null
"><span>string</span> | |
704 <var><span>title</span></var></span><span class="optional"
><span>, </span><span>function</span> | |
705 <var><span>callback</span></var></span>)</div> | |
706 <div class="description"> | |
707 <p>Creates a pane within panel's sidebar.</p> | |
708 <!-- PARAMETERS --> | |
709 <h4>Parameters</h4> | |
710 <dl> | |
711 <div> | |
712 <div> | |
713 <dt> | |
714 <var>title</var> | |
715 <em> | |
716 <!-- TYPE --> | |
717 <div style="display:inline"> | |
718 ( | |
719 <span id="typeTemplate"> | |
720 <span> | |
721 <span>string</span> | |
722 </span> | |
723 </span> | |
724 ) | |
725 </div> | |
726 </em> | |
727 </dt> | |
728 <dd>Text that is displayed in sidebar caption.</dd> | |
729 <!-- OBJECT PROPERTIES --> | |
730 <!-- OBJECT METHODS --> | |
731 <!-- OBJECT EVENT FIELDS --> | |
732 <!-- FUNCTION PARAMETERS --> | |
733 </div> | |
734 </div><div> | |
735 <div> | |
736 <dt> | |
737 <var>callback</var> | |
738 <em> | |
739 <!-- TYPE --> | |
740 <div style="display:inline"> | |
741 ( | |
742 <span class="optional">optional</span> | |
743 <span id="typeTemplate"> | |
744 <span> | |
745 <span>function</span> | |
746 </span> | |
747 </span> | |
748 ) | |
749 </div> | |
750 </em> | |
751 </dt> | |
752 <dd>A callback invoked when the sidebar is created.</dd> | |
753 <!-- OBJECT PROPERTIES --> | |
754 <!-- OBJECT METHODS --> | |
755 <!-- OBJECT EVENT FIELDS --> | |
756 <!-- FUNCTION PARAMETERS --> | |
757 </div> | |
758 </div> | |
759 </dl> | |
760 <!-- RETURNS --> | |
761 <dl> | |
762 </dl> | |
763 <!-- CALLBACK --> | |
764 <div> | |
765 <div> | |
766 <h4>Callback function</h4> | |
767 <p> | |
768 If you specify the <em>callback</em> parameter, it should | |
769 specify a function that looks like this: | |
770 </p> | |
771 <!-- Note: intentionally longer 80 columns --> | |
772 <pre>function(<span>ExtensionSidebarPane result</span>) <span
class="subdued">{...}</span>;</pre> | |
773 <dl> | |
774 <div> | |
775 <div> | |
776 <dt> | |
777 <var>result</var> | |
778 <em> | |
779 <!-- TYPE --> | |
780 <div style="display:inline"> | |
781 ( | |
782 <span id="typeTemplate"> | |
783 <span> | |
784 <a href="devtools.panels.html#type-ExtensionSidebarPane"
>ExtensionSidebarPane</a> | |
785 </span> | |
786 </span> | |
787 ) | |
788 </div> | |
789 </em> | |
790 </dt> | |
791 <dd>An ExtensionSidebarPane object for created sidebar pane.</dd> | |
792 <!-- OBJECT PROPERTIES --> | |
793 <!-- OBJECT METHODS --> | |
794 <!-- OBJECT EVENT FIELDS --> | |
795 <!-- FUNCTION PARAMETERS --> | |
796 </div> | |
797 </div> | |
798 </dl> | |
799 </div> | |
800 </div> | |
801 <!-- MIN_VERSION --> | |
802 </div> <!-- /description --> | |
803 </div> <!-- /apiItem --> | |
804 </div> | |
805 </dd> | |
806 <!-- OBJECT EVENT FIELDS --> | |
807 <dd> | |
808 <div class="apiGroup"> | |
809 <a name="global-ElementsPanel-events"></a> | |
810 <h3>Events of ElementsPanel</h3> | |
811 <!-- iterates over all events --> | |
812 <div class="apiItem"> | |
813 <a name="event-ElementsPanel-onSelectionChanged"></a> | |
814 <h4>onSelectionChanged</h4> | |
815 <div class="summary"> | |
816 <!-- Note: intentionally longer 80 columns --> | |
817 <span class="subdued">elementsPanel.</span><span>onSelectionChan
ged</span><span class="subdued">.addListener</span>(function(<span></span>) <spa
n class="subdued">{...}</span><span></span>); | |
818 </div> | |
819 <div class="description"> | |
820 <p>Fired when an object is selected in the panel.</p> | |
821 <!-- LISTENER PARAMETERS --> | |
822 <!-- EXTRA PARAMETERS --> | |
823 <!-- LISTENER RETURN VALUE --> | |
824 <dl> | |
825 </dl> | |
826 </div> <!-- /description --> | |
827 <!-- /description --> | |
828 </div> <!-- /apiItem --> | |
829 </div> | |
830 </dd> | |
831 <!-- FUNCTION PARAMETERS --> | |
832 </div> | |
833 </div><div class="apiItem"> | |
834 <a name="type-ExtensionPanel"></a> | |
835 <h4>ExtensionPanel</h4> | |
836 <div> | |
837 <dt> | |
838 <em> | |
839 <!-- TYPE --> | |
840 <div style="display:inline"> | |
841 ( | |
842 <span id="typeTemplate"> | |
843 <span> | |
844 <span>object</span> | |
845 </span> | |
846 </span> | |
847 ) | |
848 </div> | |
849 </em> | |
850 </dt> | |
851 <dd>Represents a panel created by extension.</dd> | |
852 <!-- OBJECT PROPERTIES --> | |
853 <!-- OBJECT METHODS --> | |
854 <dd> | |
855 <div class="apiGroup"> | |
856 <a name="global-ExtensionPanel-methods"></a> | |
857 <h3>Methods of ExtensionPanel</h3> | |
858 <!-- iterates over all functions --> | |
859 <div class="apiItem"> | |
860 <a name="method-ExtensionPanel-createStatusBarButton"></a> <!-- me
thod-anchor --> | |
861 <h4>createStatusBarButton</h4> | |
862 <div class="summary"><span>Button</span> | |
863 <!-- Note: intentionally longer 80 columns --> | |
864 <span>extensionPanel.createStatusBarButton</span>(<span class=
"null"><span>string</span> | |
865 <var><span>iconPath</span></var></span><span class="null">
<span>, </span><span>string</span> | |
866 <var><span>tooltipText</span></var></span><span class="nul
l"><span>, </span><span>boolean</span> | |
867 <var><span>disabled</span></var></span>)</div> | |
868 <div class="description"> | |
869 <p>Appends a button to the status bar of the panel.</p> | |
870 <!-- PARAMETERS --> | |
871 <h4>Parameters</h4> | |
872 <dl> | |
873 <div> | |
874 <div> | |
875 <dt> | |
876 <var>iconPath</var> | |
877 <em> | |
878 <!-- TYPE --> | |
879 <div style="display:inline"> | |
880 ( | |
881 <span id="typeTemplate"> | |
882 <span> | |
883 <span>string</span> | |
884 </span> | |
885 </span> | |
886 ) | |
887 </div> | |
888 </em> | |
889 </dt> | |
890 <dd>Path to the icon of the button. The file should contain a 64x24-pi
xel image composed of two 32x24 icons. The left icon is used when the button is
inactive; the right icon is displayed when the button is pressed.</dd> | |
891 <!-- OBJECT PROPERTIES --> | |
892 <!-- OBJECT METHODS --> | |
893 <!-- OBJECT EVENT FIELDS --> | |
894 <!-- FUNCTION PARAMETERS --> | |
895 </div> | |
896 </div><div> | |
897 <div> | |
898 <dt> | |
899 <var>tooltipText</var> | |
900 <em> | |
901 <!-- TYPE --> | |
902 <div style="display:inline"> | |
903 ( | |
904 <span id="typeTemplate"> | |
905 <span> | |
906 <span>string</span> | |
907 </span> | |
908 </span> | |
909 ) | |
910 </div> | |
911 </em> | |
912 </dt> | |
913 <dd>Text shown as a tooltip when user hovers the mouse over the button
.</dd> | |
914 <!-- OBJECT PROPERTIES --> | |
915 <!-- OBJECT METHODS --> | |
916 <!-- OBJECT EVENT FIELDS --> | |
917 <!-- FUNCTION PARAMETERS --> | |
918 </div> | |
919 </div><div> | |
920 <div> | |
921 <dt> | |
922 <var>disabled</var> | |
923 <em> | |
924 <!-- TYPE --> | |
925 <div style="display:inline"> | |
926 ( | |
927 <span id="typeTemplate"> | |
928 <span> | |
929 <span>boolean</span> | |
930 </span> | |
931 </span> | |
932 ) | |
933 </div> | |
934 </em> | |
935 </dt> | |
936 <dd>Whether the button is disabled.</dd> | |
937 <!-- OBJECT PROPERTIES --> | |
938 <!-- OBJECT METHODS --> | |
939 <!-- OBJECT EVENT FIELDS --> | |
940 <!-- FUNCTION PARAMETERS --> | |
941 </div> | |
942 </div> | |
943 </dl> | |
944 <!-- RETURNS --> | |
945 <h4>Returns</h4> | |
946 <dl> | |
947 <div> | |
948 <div> | |
949 <dt> | |
950 <em> | |
951 <!-- TYPE --> | |
952 <div style="display:inline"> | |
953 ( | |
954 <span id="typeTemplate"> | |
955 <span> | |
956 <a href="devtools.panels.html#type-Button">Button</a> | |
957 </span> | |
958 </span> | |
959 ) | |
960 </div> | |
961 </em> | |
962 </dt> | |
963 <dd class="todo"> | |
964 Undocumented. | |
965 </dd> | |
966 <!-- OBJECT PROPERTIES --> | |
967 <!-- OBJECT METHODS --> | |
968 <!-- OBJECT EVENT FIELDS --> | |
969 <!-- FUNCTION PARAMETERS --> | |
970 </div> | |
971 </div> | |
972 </dl> | |
973 <!-- CALLBACK --> | |
974 <!-- MIN_VERSION --> | |
975 </div> <!-- /description --> | |
976 </div> <!-- /apiItem --> | |
977 </div> | |
978 </dd> | |
979 <!-- OBJECT EVENT FIELDS --> | |
980 <dd> | |
981 <div class="apiGroup"> | |
982 <a name="global-ExtensionPanel-events"></a> | |
983 <h3>Events of ExtensionPanel</h3> | |
984 <!-- iterates over all events --> | |
985 <div class="apiItem"> | |
986 <a name="event-ExtensionPanel-onHidden"></a> | |
987 <h4>onHidden</h4> | |
988 <div class="summary"> | |
989 <!-- Note: intentionally longer 80 columns --> | |
990 <span class="subdued">extensionPanel.</span><span>onHidden</span
><span class="subdued">.addListener</span>(function(<span></span>) <span class="
subdued">{...}</span><span></span>); | |
991 </div> | |
992 <div class="description"> | |
993 <p>Fired when the user switches away from the panel.</p> | |
994 <!-- LISTENER PARAMETERS --> | |
995 <!-- EXTRA PARAMETERS --> | |
996 <!-- LISTENER RETURN VALUE --> | |
997 <dl> | |
998 </dl> | |
999 </div> <!-- /description --> | |
1000 <!-- /description --> | |
1001 </div><div class="apiItem"> | |
1002 <a name="event-ExtensionPanel-onSearch"></a> | |
1003 <h4>onSearch</h4> | |
1004 <div class="summary"> | |
1005 <!-- Note: intentionally longer 80 columns --> | |
1006 <span class="subdued">extensionPanel.</span><span>onSearch</span
><span class="subdued">.addListener</span>(function(<span>string action, string
queryString</span>) <span class="subdued">{...}</span><span></span>); | |
1007 </div> | |
1008 <div class="description"> | |
1009 <p>Fired upon a search action (start of a new search, search res
ult navigation, or search being canceled).</p> | |
1010 <!-- LISTENER PARAMETERS --> | |
1011 <div> | |
1012 <h4>Listener parameters</h4> | |
1013 <dl> | |
1014 <div> | |
1015 <div> | |
1016 <dt> | |
1017 <var>action</var> | |
1018 <em> | |
1019 <!-- TYPE --> | |
1020 <div style="display:inline"> | |
1021 ( | |
1022 <span id="typeTemplate"> | |
1023 <span> | |
1024 <span>string</span> | |
1025 </span> | |
1026 </span> | |
1027 ) | |
1028 </div> | |
1029 </em> | |
1030 </dt> | |
1031 <dd>Type of search action being performed.</dd> | |
1032 <!-- OBJECT PROPERTIES --> | |
1033 <!-- OBJECT METHODS --> | |
1034 <!-- OBJECT EVENT FIELDS --> | |
1035 <!-- FUNCTION PARAMETERS --> | |
1036 </div> | |
1037 </div><div> | |
1038 <div> | |
1039 <dt> | |
1040 <var>queryString</var> | |
1041 <em> | |
1042 <!-- TYPE --> | |
1043 <div style="display:inline"> | |
1044 ( | |
1045 <span class="optional">optional</span> | |
1046 <span id="typeTemplate"> | |
1047 <span> | |
1048 <span>string</span> | |
1049 </span> | |
1050 </span> | |
1051 ) | |
1052 </div> | |
1053 </em> | |
1054 </dt> | |
1055 <dd>Query string (only for 'performSearch').</dd> | |
1056 <!-- OBJECT PROPERTIES --> | |
1057 <!-- OBJECT METHODS --> | |
1058 <!-- OBJECT EVENT FIELDS --> | |
1059 <!-- FUNCTION PARAMETERS --> | |
1060 </div> | |
1061 </div> | |
1062 </dl> | |
1063 </div> | |
1064 <!-- EXTRA PARAMETERS --> | |
1065 <!-- LISTENER RETURN VALUE --> | |
1066 <dl> | |
1067 </dl> | |
1068 </div> <!-- /description --> | |
1069 <!-- /description --> | |
1070 </div><div class="apiItem"> | |
1071 <a name="event-ExtensionPanel-onShown"></a> | |
1072 <h4>onShown</h4> | |
1073 <div class="summary"> | |
1074 <!-- Note: intentionally longer 80 columns --> | |
1075 <span class="subdued">extensionPanel.</span><span>onShown</span>
<span class="subdued">.addListener</span>(function(<span>Window window</span>) <
span class="subdued">{...}</span><span></span>); | |
1076 </div> | |
1077 <div class="description"> | |
1078 <p>Fired when the user switches to the panel.</p> | |
1079 <!-- LISTENER PARAMETERS --> | |
1080 <div> | |
1081 <h4>Listener parameters</h4> | |
1082 <dl> | |
1083 <div> | |
1084 <div> | |
1085 <dt> | |
1086 <var>window</var> | |
1087 <em> | |
1088 <!-- TYPE --> | |
1089 <div style="display:inline"> | |
1090 ( | |
1091 <span id="typeTemplate"> | |
1092 <span> | |
1093 <span>Window</span> | |
1094 </span> | |
1095 </span> | |
1096 ) | |
1097 </div> | |
1098 </em> | |
1099 </dt> | |
1100 <dd>The <code>window</code> object of panel's page.</dd> | |
1101 <!-- OBJECT PROPERTIES --> | |
1102 <!-- OBJECT METHODS --> | |
1103 <!-- OBJECT EVENT FIELDS --> | |
1104 <!-- FUNCTION PARAMETERS --> | |
1105 </div> | |
1106 </div> | |
1107 </dl> | |
1108 </div> | |
1109 <!-- EXTRA PARAMETERS --> | |
1110 <!-- LISTENER RETURN VALUE --> | |
1111 <dl> | |
1112 </dl> | |
1113 </div> <!-- /description --> | |
1114 <!-- /description --> | |
1115 </div> <!-- /apiItem --> | |
1116 </div> | |
1117 </dd> | |
1118 <!-- FUNCTION PARAMETERS --> | |
1119 </div> | |
1120 </div><div class="apiItem"> | |
1121 <a name="type-ExtensionSidebarPane"></a> | |
1122 <h4>ExtensionSidebarPane</h4> | |
1123 <div> | |
1124 <dt> | |
1125 <em> | |
1126 <!-- TYPE --> | |
1127 <div style="display:inline"> | |
1128 ( | |
1129 <span id="typeTemplate"> | |
1130 <span> | |
1131 <span>object</span> | |
1132 </span> | |
1133 </span> | |
1134 ) | |
1135 </div> | |
1136 </em> | |
1137 </dt> | |
1138 <dd>A sidebar created by the extension.</dd> | |
1139 <!-- OBJECT PROPERTIES --> | |
1140 <!-- OBJECT METHODS --> | |
1141 <dd> | |
1142 <div class="apiGroup"> | |
1143 <a name="global-ExtensionSidebarPane-methods"></a> | |
1144 <h3>Methods of ExtensionSidebarPane</h3> | |
1145 <!-- iterates over all functions --> | |
1146 <div class="apiItem"> | |
1147 <a name="method-ExtensionSidebarPane-setExpression"></a> <!-- meth
od-anchor --> | |
1148 <h4>setExpression</h4> | |
1149 <div class="summary"> | |
1150 <!-- Note: intentionally longer 80 columns --> | |
1151 <span>extensionSidebarPane.setExpression</span>(<span class="n
ull"><span>string</span> | |
1152 <var><span>expression</span></var></span><span class="opti
onal"><span>, </span><span>string</span> | |
1153 <var><span>rootTitle</span></var></span><span class="optio
nal"><span>, </span><span>function</span> | |
1154 <var><span>callback</span></var></span>)</div> | |
1155 <div class="description"> | |
1156 <p>Sets an expression that is evaluated within the inspected pag
e. The result is displayed in the sidebar pane.</p> | |
1157 <!-- PARAMETERS --> | |
1158 <h4>Parameters</h4> | |
1159 <dl> | |
1160 <div> | |
1161 <div> | |
1162 <dt> | |
1163 <var>expression</var> | |
1164 <em> | |
1165 <!-- TYPE --> | |
1166 <div style="display:inline"> | |
1167 ( | |
1168 <span id="typeTemplate"> | |
1169 <span> | |
1170 <span>string</span> | |
1171 </span> | |
1172 </span> | |
1173 ) | |
1174 </div> | |
1175 </em> | |
1176 </dt> | |
1177 <dd>An expression to be evaluated in context of the inspected page. Ja
vaScript objects and DOM nodes are displayed in an expandable tree similar to th
e console/watch.</dd> | |
1178 <!-- OBJECT PROPERTIES --> | |
1179 <!-- OBJECT METHODS --> | |
1180 <!-- OBJECT EVENT FIELDS --> | |
1181 <!-- FUNCTION PARAMETERS --> | |
1182 </div> | |
1183 </div><div> | |
1184 <div> | |
1185 <dt> | |
1186 <var>rootTitle</var> | |
1187 <em> | |
1188 <!-- TYPE --> | |
1189 <div style="display:inline"> | |
1190 ( | |
1191 <span class="optional">optional</span> | |
1192 <span id="typeTemplate"> | |
1193 <span> | |
1194 <span>string</span> | |
1195 </span> | |
1196 </span> | |
1197 ) | |
1198 </div> | |
1199 </em> | |
1200 </dt> | |
1201 <dd>An optional title for the root of the expression tree.</dd> | |
1202 <!-- OBJECT PROPERTIES --> | |
1203 <!-- OBJECT METHODS --> | |
1204 <!-- OBJECT EVENT FIELDS --> | |
1205 <!-- FUNCTION PARAMETERS --> | |
1206 </div> | |
1207 </div><div> | |
1208 <div> | |
1209 <dt> | |
1210 <var>callback</var> | |
1211 <em> | |
1212 <!-- TYPE --> | |
1213 <div style="display:inline"> | |
1214 ( | |
1215 <span class="optional">optional</span> | |
1216 <span id="typeTemplate"> | |
1217 <span> | |
1218 <span>function</span> | |
1219 </span> | |
1220 </span> | |
1221 ) | |
1222 </div> | |
1223 </em> | |
1224 </dt> | |
1225 <dd>A callback invoked after the sidebar pane is updated with the expr
ession evaluation results.</dd> | |
1226 <!-- OBJECT PROPERTIES --> | |
1227 <!-- OBJECT METHODS --> | |
1228 <!-- OBJECT EVENT FIELDS --> | |
1229 <!-- FUNCTION PARAMETERS --> | |
1230 </div> | |
1231 </div> | |
1232 </dl> | |
1233 <!-- RETURNS --> | |
1234 <dl> | |
1235 </dl> | |
1236 <!-- CALLBACK --> | |
1237 <!-- MIN_VERSION --> | |
1238 </div> <!-- /description --> | |
1239 </div><div class="apiItem"> | |
1240 <a name="method-ExtensionSidebarPane-setHeight"></a> <!-- method-a
nchor --> | |
1241 <h4>setHeight</h4> | |
1242 <div class="summary"> | |
1243 <!-- Note: intentionally longer 80 columns --> | |
1244 <span>extensionSidebarPane.setHeight</span>(<span class="null"
><span>string</span> | |
1245 <var><span>height</span></var></span>)</div> | |
1246 <div class="description"> | |
1247 <p>Sets the height of the sidebar.</p> | |
1248 <!-- PARAMETERS --> | |
1249 <h4>Parameters</h4> | |
1250 <dl> | |
1251 <div> | |
1252 <div> | |
1253 <dt> | |
1254 <var>height</var> | |
1255 <em> | |
1256 <!-- TYPE --> | |
1257 <div style="display:inline"> | |
1258 ( | |
1259 <span id="typeTemplate"> | |
1260 <span> | |
1261 <span>string</span> | |
1262 </span> | |
1263 </span> | |
1264 ) | |
1265 </div> | |
1266 </em> | |
1267 </dt> | |
1268 <dd>A CSS-like size specification, such as <code>'100px'</code> or <co
de>'12ex'</code>.</dd> | |
1269 <!-- OBJECT PROPERTIES --> | |
1270 <!-- OBJECT METHODS --> | |
1271 <!-- OBJECT EVENT FIELDS --> | |
1272 <!-- FUNCTION PARAMETERS --> | |
1273 </div> | |
1274 </div> | |
1275 </dl> | |
1276 <!-- RETURNS --> | |
1277 <dl> | |
1278 </dl> | |
1279 <!-- CALLBACK --> | |
1280 <!-- MIN_VERSION --> | |
1281 </div> <!-- /description --> | |
1282 </div><div class="apiItem"> | |
1283 <a name="method-ExtensionSidebarPane-setObject"></a> <!-- method-a
nchor --> | |
1284 <h4>setObject</h4> | |
1285 <div class="summary"> | |
1286 <!-- Note: intentionally longer 80 columns --> | |
1287 <span>extensionSidebarPane.setObject</span>(<span class="null"
><span>string</span> | |
1288 <var><span>jsonObject</span></var></span><span class="opti
onal"><span>, </span><span>string</span> | |
1289 <var><span>rootTitle</span></var></span><span class="optio
nal"><span>, </span><span>function</span> | |
1290 <var><span>callback</span></var></span>)</div> | |
1291 <div class="description"> | |
1292 <p>Sets a JSON-compliant object to be displayed in the sidebar p
ane.</p> | |
1293 <!-- PARAMETERS --> | |
1294 <h4>Parameters</h4> | |
1295 <dl> | |
1296 <div> | |
1297 <div> | |
1298 <dt> | |
1299 <var>jsonObject</var> | |
1300 <em> | |
1301 <!-- TYPE --> | |
1302 <div style="display:inline"> | |
1303 ( | |
1304 <span id="typeTemplate"> | |
1305 <span> | |
1306 <span>string</span> | |
1307 </span> | |
1308 </span> | |
1309 ) | |
1310 </div> | |
1311 </em> | |
1312 </dt> | |
1313 <dd>An object to be displayed in context of the inspected page. Evalua
ted in the context of the caller (API client).</dd> | |
1314 <!-- OBJECT PROPERTIES --> | |
1315 <!-- OBJECT METHODS --> | |
1316 <!-- OBJECT EVENT FIELDS --> | |
1317 <!-- FUNCTION PARAMETERS --> | |
1318 </div> | |
1319 </div><div> | |
1320 <div> | |
1321 <dt> | |
1322 <var>rootTitle</var> | |
1323 <em> | |
1324 <!-- TYPE --> | |
1325 <div style="display:inline"> | |
1326 ( | |
1327 <span class="optional">optional</span> | |
1328 <span id="typeTemplate"> | |
1329 <span> | |
1330 <span>string</span> | |
1331 </span> | |
1332 </span> | |
1333 ) | |
1334 </div> | |
1335 </em> | |
1336 </dt> | |
1337 <dd>An optional title for the root of the expression tree.</dd> | |
1338 <!-- OBJECT PROPERTIES --> | |
1339 <!-- OBJECT METHODS --> | |
1340 <!-- OBJECT EVENT FIELDS --> | |
1341 <!-- FUNCTION PARAMETERS --> | |
1342 </div> | |
1343 </div><div> | |
1344 <div> | |
1345 <dt> | |
1346 <var>callback</var> | |
1347 <em> | |
1348 <!-- TYPE --> | |
1349 <div style="display:inline"> | |
1350 ( | |
1351 <span class="optional">optional</span> | |
1352 <span id="typeTemplate"> | |
1353 <span> | |
1354 <span>function</span> | |
1355 </span> | |
1356 </span> | |
1357 ) | |
1358 </div> | |
1359 </em> | |
1360 </dt> | |
1361 <dd>A callback invoked after the sidebar is updated with the object.</
dd> | |
1362 <!-- OBJECT PROPERTIES --> | |
1363 <!-- OBJECT METHODS --> | |
1364 <!-- OBJECT EVENT FIELDS --> | |
1365 <!-- FUNCTION PARAMETERS --> | |
1366 </div> | |
1367 </div> | |
1368 </dl> | |
1369 <!-- RETURNS --> | |
1370 <dl> | |
1371 </dl> | |
1372 <!-- CALLBACK --> | |
1373 <!-- MIN_VERSION --> | |
1374 </div> <!-- /description --> | |
1375 </div><div class="apiItem"> | |
1376 <a name="method-ExtensionSidebarPane-setPage"></a> <!-- method-anc
hor --> | |
1377 <h4>setPage</h4> | |
1378 <div class="summary"> | |
1379 <!-- Note: intentionally longer 80 columns --> | |
1380 <span>extensionSidebarPane.setPage</span>(<span class="null"><
span>string</span> | |
1381 <var><span>path</span></var></span>)</div> | |
1382 <div class="description"> | |
1383 <p>Sets an HTML page to be displayed in the sidebar pane.</p> | |
1384 <!-- PARAMETERS --> | |
1385 <h4>Parameters</h4> | |
1386 <dl> | |
1387 <div> | |
1388 <div> | |
1389 <dt> | |
1390 <var>path</var> | |
1391 <em> | |
1392 <!-- TYPE --> | |
1393 <div style="display:inline"> | |
1394 ( | |
1395 <span id="typeTemplate"> | |
1396 <span> | |
1397 <span>string</span> | |
1398 </span> | |
1399 </span> | |
1400 ) | |
1401 </div> | |
1402 </em> | |
1403 </dt> | |
1404 <dd>Relative path of an extension page to display within the sidebar.<
/dd> | |
1405 <!-- OBJECT PROPERTIES --> | |
1406 <!-- OBJECT METHODS --> | |
1407 <!-- OBJECT EVENT FIELDS --> | |
1408 <!-- FUNCTION PARAMETERS --> | |
1409 </div> | |
1410 </div> | |
1411 </dl> | |
1412 <!-- RETURNS --> | |
1413 <dl> | |
1414 </dl> | |
1415 <!-- CALLBACK --> | |
1416 <!-- MIN_VERSION --> | |
1417 </div> <!-- /description --> | |
1418 </div> <!-- /apiItem --> | |
1419 </div> | |
1420 </dd> | |
1421 <!-- OBJECT EVENT FIELDS --> | |
1422 <dd> | |
1423 <div class="apiGroup"> | |
1424 <a name="global-ExtensionSidebarPane-events"></a> | |
1425 <h3>Events of ExtensionSidebarPane</h3> | |
1426 <!-- iterates over all events --> | |
1427 <div class="apiItem"> | |
1428 <a name="event-ExtensionSidebarPane-onHidden"></a> | |
1429 <h4>onHidden</h4> | |
1430 <div class="summary"> | |
1431 <!-- Note: intentionally longer 80 columns --> | |
1432 <span class="subdued">extensionSidebarPane.</span><span>onHidden
</span><span class="subdued">.addListener</span>(function(<span></span>) <span c
lass="subdued">{...}</span><span></span>); | |
1433 </div> | |
1434 <div class="description"> | |
1435 <p>Fired when the sidebar pane becomes hidden as a result of the
user switching away from the panel that hosts the sidebar pane.</p> | |
1436 <!-- LISTENER PARAMETERS --> | |
1437 <!-- EXTRA PARAMETERS --> | |
1438 <!-- LISTENER RETURN VALUE --> | |
1439 <dl> | |
1440 </dl> | |
1441 </div> <!-- /description --> | |
1442 <!-- /description --> | |
1443 </div><div class="apiItem"> | |
1444 <a name="event-ExtensionSidebarPane-onShown"></a> | |
1445 <h4>onShown</h4> | |
1446 <div class="summary"> | |
1447 <!-- Note: intentionally longer 80 columns --> | |
1448 <span class="subdued">extensionSidebarPane.</span><span>onShown<
/span><span class="subdued">.addListener</span>(function(<span>Window window</sp
an>) <span class="subdued">{...}</span><span></span>); | |
1449 </div> | |
1450 <div class="description"> | |
1451 <p>Fired when the sidebar pane becomes visible as a result of us
er switching to the panel that hosts it.</p> | |
1452 <!-- LISTENER PARAMETERS --> | |
1453 <div> | |
1454 <h4>Listener parameters</h4> | |
1455 <dl> | |
1456 <div> | |
1457 <div> | |
1458 <dt> | |
1459 <var>window</var> | |
1460 <em> | |
1461 <!-- TYPE --> | |
1462 <div style="display:inline"> | |
1463 ( | |
1464 <span class="optional">optional</span> | |
1465 <span id="typeTemplate"> | |
1466 <span> | |
1467 <span>Window</span> | |
1468 </span> | |
1469 </span> | |
1470 ) | |
1471 </div> | |
1472 </em> | |
1473 </dt> | |
1474 <dd>The <code>window</code> object of the sidebar page, if one was set
with the <code>setPage()</code> method.</dd> | |
1475 <!-- OBJECT PROPERTIES --> | |
1476 <!-- OBJECT METHODS --> | |
1477 <!-- OBJECT EVENT FIELDS --> | |
1478 <!-- FUNCTION PARAMETERS --> | |
1479 </div> | |
1480 </div> | |
1481 </dl> | |
1482 </div> | |
1483 <!-- EXTRA PARAMETERS --> | |
1484 <!-- LISTENER RETURN VALUE --> | |
1485 <dl> | |
1486 </dl> | |
1487 </div> <!-- /description --> | |
1488 <!-- /description --> | |
1489 </div> <!-- /apiItem --> | |
1490 </div> | |
1491 </dd> | |
1492 <!-- FUNCTION PARAMETERS --> | |
1493 </div> | |
1494 </div><div class="apiItem"> | |
1495 <a name="type-Button"></a> | |
1496 <h4>Button</h4> | |
1497 <div> | |
1498 <dt> | |
1499 <em> | |
1500 <!-- TYPE --> | |
1501 <div style="display:inline"> | |
1502 ( | |
1503 <span id="typeTemplate"> | |
1504 <span> | |
1505 <span>object</span> | |
1506 </span> | |
1507 </span> | |
1508 ) | |
1509 </div> | |
1510 </em> | |
1511 </dt> | |
1512 <dd>A button created by the extension.</dd> | |
1513 <!-- OBJECT PROPERTIES --> | |
1514 <!-- OBJECT METHODS --> | |
1515 <dd> | |
1516 <div class="apiGroup"> | |
1517 <a name="global-Button-methods"></a> | |
1518 <h3>Methods of Button</h3> | |
1519 <!-- iterates over all functions --> | |
1520 <div class="apiItem"> | |
1521 <a name="method-Button-update"></a> <!-- method-anchor --> | |
1522 <h4>update</h4> | |
1523 <div class="summary"> | |
1524 <!-- Note: intentionally longer 80 columns --> | |
1525 <span>button.update</span>(<span class="optional"><span>string
</span> | |
1526 <var><span>iconPath</span></var></span><span class="option
al"><span>, </span><span>string</span> | |
1527 <var><span>tooltipText</span></var></span><span class="opt
ional"><span>, </span><span>boolean</span> | |
1528 <var><span>disabled</span></var></span>)</div> | |
1529 <div class="description"> | |
1530 <p>Updates the attributes of the button. If some of the argument
s are omitted or <code>null</code>, the corresponding attributes are not updated
.</p> | |
1531 <!-- PARAMETERS --> | |
1532 <h4>Parameters</h4> | |
1533 <dl> | |
1534 <div> | |
1535 <div> | |
1536 <dt> | |
1537 <var>iconPath</var> | |
1538 <em> | |
1539 <!-- TYPE --> | |
1540 <div style="display:inline"> | |
1541 ( | |
1542 <span class="optional">optional</span> | |
1543 <span id="typeTemplate"> | |
1544 <span> | |
1545 <span>string</span> | |
1546 </span> | |
1547 </span> | |
1548 ) | |
1549 </div> | |
1550 </em> | |
1551 </dt> | |
1552 <dd>Path to the new icon of the button.</dd> | |
1553 <!-- OBJECT PROPERTIES --> | |
1554 <!-- OBJECT METHODS --> | |
1555 <!-- OBJECT EVENT FIELDS --> | |
1556 <!-- FUNCTION PARAMETERS --> | |
1557 </div> | |
1558 </div><div> | |
1559 <div> | |
1560 <dt> | |
1561 <var>tooltipText</var> | |
1562 <em> | |
1563 <!-- TYPE --> | |
1564 <div style="display:inline"> | |
1565 ( | |
1566 <span class="optional">optional</span> | |
1567 <span id="typeTemplate"> | |
1568 <span> | |
1569 <span>string</span> | |
1570 </span> | |
1571 </span> | |
1572 ) | |
1573 </div> | |
1574 </em> | |
1575 </dt> | |
1576 <dd>Text shown as a tooltip when user hovers the mouse over the button
.</dd> | |
1577 <!-- OBJECT PROPERTIES --> | |
1578 <!-- OBJECT METHODS --> | |
1579 <!-- OBJECT EVENT FIELDS --> | |
1580 <!-- FUNCTION PARAMETERS --> | |
1581 </div> | |
1582 </div><div> | |
1583 <div> | |
1584 <dt> | |
1585 <var>disabled</var> | |
1586 <em> | |
1587 <!-- TYPE --> | |
1588 <div style="display:inline"> | |
1589 ( | |
1590 <span class="optional">optional</span> | |
1591 <span id="typeTemplate"> | |
1592 <span> | |
1593 <span>boolean</span> | |
1594 </span> | |
1595 </span> | |
1596 ) | |
1597 </div> | |
1598 </em> | |
1599 </dt> | |
1600 <dd>Whether the button is disabled.</dd> | |
1601 <!-- OBJECT PROPERTIES --> | |
1602 <!-- OBJECT METHODS --> | |
1603 <!-- OBJECT EVENT FIELDS --> | |
1604 <!-- FUNCTION PARAMETERS --> | |
1605 </div> | |
1606 </div> | |
1607 </dl> | |
1608 <!-- RETURNS --> | |
1609 <dl> | |
1610 </dl> | |
1611 <!-- CALLBACK --> | |
1612 <!-- MIN_VERSION --> | |
1613 </div> <!-- /description --> | |
1614 </div> <!-- /apiItem --> | |
1615 </div> | |
1616 </dd> | |
1617 <!-- OBJECT EVENT FIELDS --> | |
1618 <dd> | |
1619 <div class="apiGroup"> | |
1620 <a name="global-Button-events"></a> | |
1621 <h3>Events of Button</h3> | |
1622 <!-- iterates over all events --> | |
1623 <div class="apiItem"> | |
1624 <a name="event-Button-onClicked"></a> | |
1625 <h4>onClicked</h4> | |
1626 <div class="summary"> | |
1627 <!-- Note: intentionally longer 80 columns --> | |
1628 <span class="subdued">button.</span><span>onClicked</span><span
class="subdued">.addListener</span>(function(<span></span>) <span class="subdued
">{...}</span><span></span>); | |
1629 </div> | |
1630 <div class="description"> | |
1631 <p>Fired when the button is clicked.</p> | |
1632 <!-- LISTENER PARAMETERS --> | |
1633 <!-- EXTRA PARAMETERS --> | |
1634 <!-- LISTENER RETURN VALUE --> | |
1635 <dl> | |
1636 </dl> | |
1637 </div> <!-- /description --> | |
1638 <!-- /description --> | |
1639 </div> <!-- /apiItem --> | |
1640 </div> | |
1641 </dd> | |
1642 <!-- FUNCTION PARAMETERS --> | |
1643 </div> | |
1644 </div> <!-- /apiItem --> | |
1645 </div> <!-- /apiGroup --> | |
1646 </div> <!-- /apiPage --> | |
1647 </div> <!-- /gc-pagecontent --> | |
1648 </div> <!-- /g-section --> | |
1649 </div> <!-- /codesiteContent --> | |
1650 <div id="gc-footer" --=""> | |
1651 <div class="text"> | |
1652 <p> | |
1653 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | |
1654 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | |
1655 Attribution 3.0 License</a>, and code samples are licensed under the | |
1656 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | |
1657 </p> | |
1658 <p> | |
1659 ©2011 Google | |
1660 </p> | |
1661 <!-- begin analytics --> | |
1662 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> | |
1663 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc
ript> | |
1664 <script type="text/javascript"> | |
1665 // chrome doc tracking | |
1666 try { | |
1667 var engdocs = _gat._getTracker("YT-10763712-2"); | |
1668 engdocs._trackPageview(); | |
1669 } catch(err) {} | |
1670 // code.google.com site-wide tracking | |
1671 try { | |
1672 _uacct="UA-18071-1"; | |
1673 _uanchor=1; | |
1674 _uff=0; | |
1675 urchinTracker(); | |
1676 } | |
1677 catch(e) {/* urchinTracker not available. */} | |
1678 </script> | |
1679 <!-- end analytics --> | |
1680 </div> | |
1681 </div> <!-- /gc-footer --> | |
1682 </div> <!-- /gc-container --> | |
1683 </body></html> | |
OLD | NEW |