| 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.omnibox module,
which is part of the Google Chrome extension APIs."><title>Omnibox - Google Ch
rome 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 class="leftNavSelected">Omnibox</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">Omnibox</h1> | |
| 189 </div> | |
| 190 <!-- TABLE OF CONTENTS --> | |
| 191 <div id="toc"> | |
| 192 <h2>Contents</h2> | |
| 193 <ol> | |
| 194 <li> | |
| 195 <a href="#manifest">Manifest</a> | |
| 196 <ol> | |
| 197 </ol> | |
| 198 </li><li> | |
| 199 <a href="#examples">Examples</a> | |
| 200 <ol> | |
| 201 </ol> | |
| 202 </li> | |
| 203 <li> | |
| 204 <a href="#apiReference">API reference: chrome.omnibox</a> | |
| 205 <ol> | |
| 206 <li> | |
| 207 <a href="#global-methods">Methods</a> | |
| 208 <ol> | |
| 209 <li> | |
| 210 <a href="#method-setDefaultSuggestion">setDefaultSuggestion</a> | |
| 211 </li> | |
| 212 </ol> | |
| 213 </li> | |
| 214 <li> | |
| 215 <a href="#global-events">Events</a> | |
| 216 <ol> | |
| 217 <li> | |
| 218 <a href="#event-onInputCancelled">onInputCancelled</a> | |
| 219 </li><li> | |
| 220 <a href="#event-onInputChanged">onInputChanged</a> | |
| 221 </li><li> | |
| 222 <a href="#event-onInputEntered">onInputEntered</a> | |
| 223 </li><li> | |
| 224 <a href="#event-onInputStarted">onInputStarted</a> | |
| 225 </li> | |
| 226 </ol> | |
| 227 </li> | |
| 228 <li> | |
| 229 <a href="#types">Types</a> | |
| 230 <ol> | |
| 231 <li> | |
| 232 <a href="#type-SuggestResult">SuggestResult</a> | |
| 233 <ol> | |
| 234 </ol> | |
| 235 </li> | |
| 236 </ol> | |
| 237 </li> | |
| 238 </ol> | |
| 239 </li> | |
| 240 </ol> | |
| 241 </div> | |
| 242 <!-- /TABLE OF CONTENTS --> | |
| 243 <!-- Standard content lead-in for experimental API pages --> | |
| 244 <!-- STATIC CONTENT PLACEHOLDER --> | |
| 245 <div id="static"><div id="pageData-name" class="pageData">Omnibox</div> | |
| 246 <!-- BEGIN AUTHORED CONTENT --> | |
| 247 <p> | |
| 248 The omnibox API allows you to register a | |
| 249 keyword with Google Chrome's address bar, | |
| 250 which is also known as the omnibox. | |
| 251 </p> | |
| 252 <p> | |
| 253 <img src="images/omnibox.png" width="300" height="150" alt="A screenshot showing
suggestions related to the keyword 'Chromium Search'"> | |
| 254 </p> | |
| 255 <p> | |
| 256 When the user enters your extension's | |
| 257 keyword, the user starts | |
| 258 interacting solely with your extension. | |
| 259 Each keystroke is sent to your | |
| 260 extension, and you can provide suggestions | |
| 261 in response. | |
| 262 </p> | |
| 263 <p> | |
| 264 The suggestions can be richly formatted | |
| 265 in a variety of ways. | |
| 266 <!-- PENDING: for example? (include a mention of method name, maybe show a code
snippet) --> | |
| 267 When the user accepts | |
| 268 a suggestion, your extension is notified | |
| 269 and can take action. | |
| 270 </p> | |
| 271 <h2 id="manifest">Manifest</h2> | |
| 272 <p> | |
| 273 You must include an <code>omnibox</code> <code>keyword</code> field | |
| 274 in the <a href="manifest.html">manifest</a> | |
| 275 to use the omnibox API. | |
| 276 You should also | |
| 277 specify a 16x16-pixel icon, which will be | |
| 278 displayed in the address bar when suggesting that users | |
| 279 enter keyword mode. | |
| 280 </p> | |
| 281 <p> | |
| 282 For example: | |
| 283 </p> | |
| 284 <pre>{ | |
| 285 "name": "Aaron's omnibox extension", | |
| 286 "version": "1.0", | |
| 287 <b>"omnibox": { "keyword" : "aaron" },</b> | |
| 288 <b>"icons": {</b> | |
| 289 <b>"16": "16-full-color.png"</b> | |
| 290 <b>},</b> | |
| 291 "background": { | |
| 292 "scripts": ["background.js"] | |
| 293 } | |
| 294 }</pre> | |
| 295 <p class="note"> | |
| 296 <strong>Note:</strong> | |
| 297 Chrome automatically creates a grayscale version of | |
| 298 your 16x16-pixel icon. You should provide | |
| 299 a full-color version so that it can also be | |
| 300 used in other situations that require color. | |
| 301 For example, the <a href="contextMenus.html">context menus API</a> also uses a 1
6x16-pixel | |
| 302 icon, but it is displayed in color. | |
| 303 </p> | |
| 304 <h2 id="examples">Examples</h2> | |
| 305 <p> | |
| 306 You can find samples of this API on the | |
| 307 <a href="samples.html#omnibox">sample page</a>. | |
| 308 <!-- END AUTHORED CONTENT --> | |
| 309 </p></div> | |
| 310 <!-- API PAGE --> | |
| 311 <div class="apiPage"> | |
| 312 <a name="apiReference"></a> | |
| 313 <h2>API reference: chrome.omnibox</h2> | |
| 314 <!-- PROPERTIES --> | |
| 315 <!-- /apiGroup --> | |
| 316 <!-- METHODS --> | |
| 317 <div id="methodsTemplate" class="apiGroup"> | |
| 318 <a name="global-methods"></a> | |
| 319 <h3>Methods</h3> | |
| 320 <!-- iterates over all functions --> | |
| 321 <div class="apiItem"> | |
| 322 <a name="method-setDefaultSuggestion"></a> <!-- method-anchor --> | |
| 323 <h4>setDefaultSuggestion</h4> | |
| 324 <div class="summary"> | |
| 325 <!-- Note: intentionally longer 80 columns --> | |
| 326 <span>chrome.omnibox.setDefaultSuggestion</span>(<span class="
null"><span>object</span> | |
| 327 <var><span>suggestion</span></var></span>)</div> | |
| 328 <div class="description"> | |
| 329 <p>Sets the description and styling for the default suggestion.
The default suggestion is the text that is displayed in the first suggestion row
underneath the URL bar.</p> | |
| 330 <!-- PARAMETERS --> | |
| 331 <h4>Parameters</h4> | |
| 332 <dl> | |
| 333 <div> | |
| 334 <div> | |
| 335 <dt> | |
| 336 <var>suggestion</var> | |
| 337 <em> | |
| 338 <!-- TYPE --> | |
| 339 <div style="display:inline"> | |
| 340 ( | |
| 341 <span id="typeTemplate"> | |
| 342 <span> | |
| 343 <span>object</span> | |
| 344 </span> | |
| 345 </span> | |
| 346 ) | |
| 347 </div> | |
| 348 </em> | |
| 349 </dt> | |
| 350 <dd>A partial SuggestResult object, without the 'content' parameter. S
ee SuggestResult for a description of the parameters.</dd> | |
| 351 <!-- OBJECT PROPERTIES --> | |
| 352 <dd> | |
| 353 <dl> | |
| 354 <div> | |
| 355 <div> | |
| 356 <dt> | |
| 357 <var>description</var> | |
| 358 <em> | |
| 359 <!-- TYPE --> | |
| 360 <div style="display:inline"> | |
| 361 ( | |
| 362 <span id="typeTemplate"> | |
| 363 <span> | |
| 364 <span>string</span> | |
| 365 </span> | |
| 366 </span> | |
| 367 ) | |
| 368 </div> | |
| 369 </em> | |
| 370 </dt> | |
| 371 <dd>The text to display in the default suggestion. The placeholder str
ing '%s' can be included and will be replaced with the user's input.</dd> | |
| 372 <!-- OBJECT PROPERTIES --> | |
| 373 <!-- OBJECT METHODS --> | |
| 374 <!-- OBJECT EVENT FIELDS --> | |
| 375 <!-- FUNCTION PARAMETERS --> | |
| 376 </div> | |
| 377 </div> | |
| 378 </dl> | |
| 379 </dd> | |
| 380 <!-- OBJECT METHODS --> | |
| 381 <!-- OBJECT EVENT FIELDS --> | |
| 382 <!-- FUNCTION PARAMETERS --> | |
| 383 </div> | |
| 384 </div> | |
| 385 </dl> | |
| 386 <!-- RETURNS --> | |
| 387 <dl> | |
| 388 </dl> | |
| 389 <!-- CALLBACK --> | |
| 390 <!-- MIN_VERSION --> | |
| 391 </div> <!-- /description --> | |
| 392 </div> <!-- /apiItem --> | |
| 393 </div> <!-- /apiGroup --> | |
| 394 <!-- EVENTS --> | |
| 395 <div id="eventsTemplate" class="apiGroup"> | |
| 396 <a name="global-events"></a> | |
| 397 <h3>Events</h3> | |
| 398 <!-- iterates over all events --> | |
| 399 <div class="apiItem"> | |
| 400 <a name="event-onInputCancelled"></a> | |
| 401 <h4>onInputCancelled</h4> | |
| 402 <div class="summary"> | |
| 403 <!-- Note: intentionally longer 80 columns --> | |
| 404 <span class="subdued">chrome.omnibox.</span><span>onInputCancell
ed</span><span class="subdued">.addListener</span>(function(<span></span>) <span
class="subdued">{...}</span><span></span>); | |
| 405 </div> | |
| 406 <div class="description"> | |
| 407 <p>User has ended the keyword input session without accepting th
e input.</p> | |
| 408 <!-- LISTENER PARAMETERS --> | |
| 409 <!-- EXTRA PARAMETERS --> | |
| 410 <!-- LISTENER RETURN VALUE --> | |
| 411 <dl> | |
| 412 </dl> | |
| 413 </div> <!-- /description --> | |
| 414 <!-- /description --> | |
| 415 </div><div class="apiItem"> | |
| 416 <a name="event-onInputChanged"></a> | |
| 417 <h4>onInputChanged</h4> | |
| 418 <div class="summary"> | |
| 419 <!-- Note: intentionally longer 80 columns --> | |
| 420 <span class="subdued">chrome.omnibox.</span><span>onInputChanged
</span><span class="subdued">.addListener</span>(function(<span>string text, fun
ction suggest</span>) <span class="subdued">{...}</span><span></span>); | |
| 421 </div> | |
| 422 <div class="description"> | |
| 423 <p>User has changed what is typed into the omnibox.</p> | |
| 424 <!-- LISTENER PARAMETERS --> | |
| 425 <div> | |
| 426 <h4>Listener parameters</h4> | |
| 427 <dl> | |
| 428 <div> | |
| 429 <div> | |
| 430 <dt> | |
| 431 <var>text</var> | |
| 432 <em> | |
| 433 <!-- TYPE --> | |
| 434 <div style="display:inline"> | |
| 435 ( | |
| 436 <span id="typeTemplate"> | |
| 437 <span> | |
| 438 <span>string</span> | |
| 439 </span> | |
| 440 </span> | |
| 441 ) | |
| 442 </div> | |
| 443 </em> | |
| 444 </dt> | |
| 445 <dd class="todo"> | |
| 446 Undocumented. | |
| 447 </dd> | |
| 448 <!-- OBJECT PROPERTIES --> | |
| 449 <!-- OBJECT METHODS --> | |
| 450 <!-- OBJECT EVENT FIELDS --> | |
| 451 <!-- FUNCTION PARAMETERS --> | |
| 452 </div> | |
| 453 </div><div> | |
| 454 <div> | |
| 455 <dt> | |
| 456 <var>suggest</var> | |
| 457 <em> | |
| 458 <!-- TYPE --> | |
| 459 <div style="display:inline"> | |
| 460 ( | |
| 461 <span id="typeTemplate"> | |
| 462 <span> | |
| 463 <span>function</span> | |
| 464 </span> | |
| 465 </span> | |
| 466 ) | |
| 467 </div> | |
| 468 </em> | |
| 469 </dt> | |
| 470 <dd>A callback passed to the onInputChanged event used for sending sug
gestions back to the browser.</dd> | |
| 471 <!-- OBJECT PROPERTIES --> | |
| 472 <!-- OBJECT METHODS --> | |
| 473 <!-- OBJECT EVENT FIELDS --> | |
| 474 <!-- FUNCTION PARAMETERS --> | |
| 475 <dd> | |
| 476 <div> | |
| 477 <h5>Parameters</h5> | |
| 478 <dl> | |
| 479 <div> | |
| 480 <div> | |
| 481 <dt> | |
| 482 <var>suggestResults</var> | |
| 483 <em> | |
| 484 <!-- TYPE --> | |
| 485 <div style="display:inline"> | |
| 486 ( | |
| 487 <span id="typeTemplate"> | |
| 488 <span> | |
| 489 <span> | |
| 490 array of <span><span> | |
| 491 <span> | |
| 492 <a href="omnibox.html#type-SuggestResult">SuggestResult<
/a> | |
| 493 </span> | |
| 494 </span></span> | |
| 495 </span> | |
| 496 </span> | |
| 497 </span> | |
| 498 ) | |
| 499 </div> | |
| 500 </em> | |
| 501 </dt> | |
| 502 <dd>Array of suggest results</dd> | |
| 503 <!-- OBJECT PROPERTIES --> | |
| 504 <!-- OBJECT METHODS --> | |
| 505 <!-- OBJECT EVENT FIELDS --> | |
| 506 <!-- FUNCTION PARAMETERS --> | |
| 507 </div> | |
| 508 </div> | |
| 509 </dl> | |
| 510 </div> | |
| 511 </dd> | |
| 512 </div> | |
| 513 </div> | |
| 514 </dl> | |
| 515 </div> | |
| 516 <!-- EXTRA PARAMETERS --> | |
| 517 <!-- LISTENER RETURN VALUE --> | |
| 518 <dl> | |
| 519 </dl> | |
| 520 </div> <!-- /description --> | |
| 521 <!-- /description --> | |
| 522 </div><div class="apiItem"> | |
| 523 <a name="event-onInputEntered"></a> | |
| 524 <h4>onInputEntered</h4> | |
| 525 <div class="summary"> | |
| 526 <!-- Note: intentionally longer 80 columns --> | |
| 527 <span class="subdued">chrome.omnibox.</span><span>onInputEntered
</span><span class="subdued">.addListener</span>(function(<span>string text</spa
n>) <span class="subdued">{...}</span><span></span>); | |
| 528 </div> | |
| 529 <div class="description"> | |
| 530 <p>User has accepted what is typed into the omnibox.</p> | |
| 531 <!-- LISTENER PARAMETERS --> | |
| 532 <div> | |
| 533 <h4>Listener parameters</h4> | |
| 534 <dl> | |
| 535 <div> | |
| 536 <div> | |
| 537 <dt> | |
| 538 <var>text</var> | |
| 539 <em> | |
| 540 <!-- TYPE --> | |
| 541 <div style="display:inline"> | |
| 542 ( | |
| 543 <span id="typeTemplate"> | |
| 544 <span> | |
| 545 <span>string</span> | |
| 546 </span> | |
| 547 </span> | |
| 548 ) | |
| 549 </div> | |
| 550 </em> | |
| 551 </dt> | |
| 552 <dd class="todo"> | |
| 553 Undocumented. | |
| 554 </dd> | |
| 555 <!-- OBJECT PROPERTIES --> | |
| 556 <!-- OBJECT METHODS --> | |
| 557 <!-- OBJECT EVENT FIELDS --> | |
| 558 <!-- FUNCTION PARAMETERS --> | |
| 559 </div> | |
| 560 </div> | |
| 561 </dl> | |
| 562 </div> | |
| 563 <!-- EXTRA PARAMETERS --> | |
| 564 <!-- LISTENER RETURN VALUE --> | |
| 565 <dl> | |
| 566 </dl> | |
| 567 </div> <!-- /description --> | |
| 568 <!-- /description --> | |
| 569 </div><div class="apiItem"> | |
| 570 <a name="event-onInputStarted"></a> | |
| 571 <h4>onInputStarted</h4> | |
| 572 <div class="summary"> | |
| 573 <!-- Note: intentionally longer 80 columns --> | |
| 574 <span class="subdued">chrome.omnibox.</span><span>onInputStarted
</span><span class="subdued">.addListener</span>(function(<span></span>) <span c
lass="subdued">{...}</span><span></span>); | |
| 575 </div> | |
| 576 <div class="description"> | |
| 577 <p>User has started a keyword input session by typing the extens
ion's keyword. This is guaranteed to be sent exactly once per input session, and
before any onInputChanged events.</p> | |
| 578 <!-- LISTENER PARAMETERS --> | |
| 579 <!-- EXTRA PARAMETERS --> | |
| 580 <!-- LISTENER RETURN VALUE --> | |
| 581 <dl> | |
| 582 </dl> | |
| 583 </div> <!-- /description --> | |
| 584 <!-- /description --> | |
| 585 </div> <!-- /apiItem --> | |
| 586 </div> <!-- /apiGroup --> | |
| 587 <!-- TYPES --> | |
| 588 <div class="apiGroup"> | |
| 589 <a name="types"></a> | |
| 590 <h3 id="types">Types</h3> | |
| 591 <!-- iterates over all types --> | |
| 592 <div class="apiItem"> | |
| 593 <a name="type-SuggestResult"></a> | |
| 594 <h4>SuggestResult</h4> | |
| 595 <div> | |
| 596 <dt> | |
| 597 <em> | |
| 598 <!-- TYPE --> | |
| 599 <div style="display:inline"> | |
| 600 ( | |
| 601 <span id="typeTemplate"> | |
| 602 <span> | |
| 603 <span>object</span> | |
| 604 </span> | |
| 605 </span> | |
| 606 ) | |
| 607 </div> | |
| 608 </em> | |
| 609 </dt> | |
| 610 <dd>A suggest result.</dd> | |
| 611 <!-- OBJECT PROPERTIES --> | |
| 612 <dd> | |
| 613 <dl> | |
| 614 <div> | |
| 615 <div> | |
| 616 <dt> | |
| 617 <var>content</var> | |
| 618 <em> | |
| 619 <!-- TYPE --> | |
| 620 <div style="display:inline"> | |
| 621 ( | |
| 622 <span id="typeTemplate"> | |
| 623 <span> | |
| 624 <span>string</span> | |
| 625 </span> | |
| 626 </span> | |
| 627 ) | |
| 628 </div> | |
| 629 </em> | |
| 630 </dt> | |
| 631 <dd>The text that is put into the URL bar, and that is sent to the ext
ension when the user chooses this entry.</dd> | |
| 632 <!-- OBJECT PROPERTIES --> | |
| 633 <!-- OBJECT METHODS --> | |
| 634 <!-- OBJECT EVENT FIELDS --> | |
| 635 <!-- FUNCTION PARAMETERS --> | |
| 636 </div> | |
| 637 </div><div> | |
| 638 <div> | |
| 639 <dt> | |
| 640 <var>description</var> | |
| 641 <em> | |
| 642 <!-- TYPE --> | |
| 643 <div style="display:inline"> | |
| 644 ( | |
| 645 <span id="typeTemplate"> | |
| 646 <span> | |
| 647 <span>string</span> | |
| 648 </span> | |
| 649 </span> | |
| 650 ) | |
| 651 </div> | |
| 652 </em> | |
| 653 </dt> | |
| 654 <dd>The text that is displayed in the URL dropdown. Can contain XML-st
yle markup for styling. The supported tags are 'url' (for a literal URL), 'match
' (for highlighting text that matched what the user's query), and 'dim' (for dim
helper text). The styles can be nested, eg. <dim><match>dimmed match</match></d
im>.</dd> | |
| 655 <!-- OBJECT PROPERTIES --> | |
| 656 <!-- OBJECT METHODS --> | |
| 657 <!-- OBJECT EVENT FIELDS --> | |
| 658 <!-- FUNCTION PARAMETERS --> | |
| 659 </div> | |
| 660 </div> | |
| 661 </dl> | |
| 662 </dd> | |
| 663 <!-- OBJECT METHODS --> | |
| 664 <!-- OBJECT EVENT FIELDS --> | |
| 665 <!-- FUNCTION PARAMETERS --> | |
| 666 </div> | |
| 667 </div> <!-- /apiItem --> | |
| 668 </div> <!-- /apiGroup --> | |
| 669 </div> <!-- /apiPage --> | |
| 670 </div> <!-- /gc-pagecontent --> | |
| 671 </div> <!-- /g-section --> | |
| 672 </div> <!-- /codesiteContent --> | |
| 673 <div id="gc-footer" --=""> | |
| 674 <div class="text"> | |
| 675 <p> | |
| 676 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | |
| 677 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | |
| 678 Attribution 3.0 License</a>, and code samples are licensed under the | |
| 679 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | |
| 680 </p> | |
| 681 <p> | |
| 682 ©2011 Google | |
| 683 </p> | |
| 684 <!-- begin analytics --> | |
| 685 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> | |
| 686 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc
ript> | |
| 687 <script type="text/javascript"> | |
| 688 // chrome doc tracking | |
| 689 try { | |
| 690 var engdocs = _gat._getTracker("YT-10763712-2"); | |
| 691 engdocs._trackPageview(); | |
| 692 } catch(err) {} | |
| 693 // code.google.com site-wide tracking | |
| 694 try { | |
| 695 _uacct="UA-18071-1"; | |
| 696 _uanchor=1; | |
| 697 _uff=0; | |
| 698 urchinTracker(); | |
| 699 } | |
| 700 catch(e) {/* urchinTracker not available. */} | |
| 701 </script> | |
| 702 <!-- end analytics --> | |
| 703 </div> | |
| 704 </div> <!-- /gc-footer --> | |
| 705 </div> <!-- /gc-container --> | |
| 706 </body></html> | |
| OLD | NEW |