| 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.history module,
which is part of the Google Chrome extension APIs."><title>chrome.history - Go
ogle 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 class="leftNavSelected">History</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.history</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="#transition_types">Transition types</a> | |
| 200 <ol> | |
| 201 </ol> | |
| 202 </li><li> | |
| 203 <a href="#examples">Examples</a> | |
| 204 <ol> | |
| 205 </ol> | |
| 206 </li> | |
| 207 <li> | |
| 208 <a href="#apiReference">API reference: chrome.history</a> | |
| 209 <ol> | |
| 210 <li> | |
| 211 <a href="#global-methods">Methods</a> | |
| 212 <ol> | |
| 213 <li> | |
| 214 <a href="#method-addUrl">addUrl</a> | |
| 215 </li><li> | |
| 216 <a href="#method-deleteAll">deleteAll</a> | |
| 217 </li><li> | |
| 218 <a href="#method-deleteRange">deleteRange</a> | |
| 219 </li><li> | |
| 220 <a href="#method-deleteUrl">deleteUrl</a> | |
| 221 </li><li> | |
| 222 <a href="#method-getVisits">getVisits</a> | |
| 223 </li><li> | |
| 224 <a href="#method-search">search</a> | |
| 225 </li> | |
| 226 </ol> | |
| 227 </li> | |
| 228 <li> | |
| 229 <a href="#global-events">Events</a> | |
| 230 <ol> | |
| 231 <li> | |
| 232 <a href="#event-onVisitRemoved">onVisitRemoved</a> | |
| 233 </li><li> | |
| 234 <a href="#event-onVisited">onVisited</a> | |
| 235 </li> | |
| 236 </ol> | |
| 237 </li> | |
| 238 <li> | |
| 239 <a href="#types">Types</a> | |
| 240 <ol> | |
| 241 <li> | |
| 242 <a href="#type-HistoryItem">HistoryItem</a> | |
| 243 <ol> | |
| 244 </ol> | |
| 245 </li><li> | |
| 246 <a href="#type-VisitItem">VisitItem</a> | |
| 247 <ol> | |
| 248 </ol> | |
| 249 </li> | |
| 250 </ol> | |
| 251 </li> | |
| 252 </ol> | |
| 253 </li> | |
| 254 </ol> | |
| 255 </div> | |
| 256 <!-- /TABLE OF CONTENTS --> | |
| 257 <!-- Standard content lead-in for experimental API pages --> | |
| 258 <!-- STATIC CONTENT PLACEHOLDER --> | |
| 259 <div id="static"><!-- BEGIN AUTHORED CONTENT --> | |
| 260 <p id="classSummary"> | |
| 261 Use the <code>chrome.history</code> module to interact with the | |
| 262 browser's record of visited pages. You can add, remove, and query | |
| 263 for URLs in the browser's history. | |
| 264 To override the history page with your own version, see | |
| 265 <a href="override.html">Override Pages</a>. | |
| 266 </p> | |
| 267 <h2 id="manifest">Manifest</h2> | |
| 268 <p>You must declare the "history" permission | |
| 269 in the <a href="manifest.html">extension manifest</a> | |
| 270 to use the history API. | |
| 271 For example:</p> | |
| 272 <pre>{ | |
| 273 "name": "My extension", | |
| 274 ... | |
| 275 <b>"permissions": [ | |
| 276 "history" | |
| 277 ]</b>, | |
| 278 ... | |
| 279 }</pre> | |
| 280 <h2 id="transition_types">Transition types</h2> | |
| 281 <p> | |
| 282 The history API uses a <em>transition type</em> to describe | |
| 283 how the browser navigated to a particular URL | |
| 284 on a particular visit. | |
| 285 For example, if a user visits a page | |
| 286 by clicking a link on another page, | |
| 287 the transition type is "link". | |
| 288 </p> | |
| 289 <p> | |
| 290 The following table describes each transition type. | |
| 291 </p> | |
| 292 <table> | |
| 293 <tbody><tr> | |
| 294 <th> Transition type </th> <th> Description </th> | |
| 295 </tr> | |
| 296 <tr id="tt_link"> | |
| 297 <td>"link"</td> | |
| 298 <td> | |
| 299 The user got to this page by clicking a link on another page. | |
| 300 </td> | |
| 301 </tr> | |
| 302 <tr id="tt_typed"> | |
| 303 <td>"typed"</td> | |
| 304 <td> | |
| 305 The user got this page by typing the URL in the address bar. | |
| 306 Also used for other explicit navigation actions. | |
| 307 See also <a href="#tt_generated">generated</a>, | |
| 308 which is used for cases where the user selected a choice | |
| 309 that didn't look at all like a URL. | |
| 310 </td> | |
| 311 </tr> | |
| 312 <tr id="tt_auto_bookmark"> | |
| 313 <td>"auto_bookmark"</td> | |
| 314 <td> | |
| 315 The user got to this page through a suggestion in the UI — | |
| 316 for example, through a menu item. | |
| 317 </td> | |
| 318 </tr> | |
| 319 <tr id="tt_auto_subframe"> | |
| 320 <td>"auto_subframe"</td> | |
| 321 <td> | |
| 322 Subframe navigation. | |
| 323 This is any content that is automatically | |
| 324 loaded in a non-top-level frame. | |
| 325 For example, if a page consists of | |
| 326 several frames containing ads, | |
| 327 those ad URLs have this transition type. | |
| 328 The user may not even realize the content in these pages | |
| 329 is a separate frame, and so may not care about the URL | |
| 330 (see also <a href="#tt_manual_subframe">manual_subframe</a>). | |
| 331 </td> | |
| 332 </tr> | |
| 333 <tr id="tt_manual_subframe"> | |
| 334 <td>"manual_subframe"</td> | |
| 335 <td> | |
| 336 For subframe navigations that are explicitly requested by the user | |
| 337 and generate new navigation entries in the back/forward list. | |
| 338 An explicitly requested frame is probably more important than | |
| 339 an automatically loaded frame | |
| 340 because the user probably cares about the fact that | |
| 341 the requested frame was loaded. | |
| 342 </td> | |
| 343 </tr> | |
| 344 <tr id="tt_generated"> | |
| 345 <td>"generated"</td> | |
| 346 <td> | |
| 347 The user got to this page by typing in the address bar | |
| 348 and selecting an entry that did not look like a URL. | |
| 349 For example, a match might have the URL of a Google search result page, | |
| 350 but it might appear to the user as "Search Google for ...". | |
| 351 These are not quite the same as <a href="#tt_typed">typed</a> navigations | |
| 352 because the user didn't type or see the destination URL. | |
| 353 See also <a href="#tt_keyword">keyword</a>. | |
| 354 </td> | |
| 355 </tr> | |
| 356 <tr id="tt_start_page"> | |
| 357 <td>"start_page"</td> | |
| 358 <td> | |
| 359 The page was specified in the command line or is the start page. | |
| 360 </td> | |
| 361 </tr> | |
| 362 <tr id="tt_form_submit"> | |
| 363 <td>"form_submit"</td> | |
| 364 <td> | |
| 365 The user filled out values in a form and submitted it. | |
| 366 Note that in some situations — | |
| 367 such as when a form uses script to submit contents — | |
| 368 submitting a form does not result in this transition type. | |
| 369 </td> | |
| 370 </tr> | |
| 371 <tr id="tt_reload"> | |
| 372 <td>"reload"</td> | |
| 373 <td> | |
| 374 The user reloaded the page, | |
| 375 either by clicking the reload button | |
| 376 or by pressing Enter in the address bar. | |
| 377 Session restore and Reopen closed tab use this transition type, too. | |
| 378 </td> | |
| 379 </tr> | |
| 380 <tr id="tt_keyword"> | |
| 381 <td>"keyword"</td> | |
| 382 <td> | |
| 383 The URL was generated from a replaceable keyword | |
| 384 other than the default search provider. | |
| 385 See also | |
| 386 <a href="#tt_keyword_generated">keyword_generated</a>. | |
| 387 </td> | |
| 388 </tr> | |
| 389 <tr id="tt_keyword_generated"> | |
| 390 <td>"keyword_generated"</td> | |
| 391 <td> | |
| 392 Corresponds to a visit generated for a keyword. | |
| 393 See also <a href="#tt_keyword">keyword</a>. | |
| 394 </td> | |
| 395 </tr> | |
| 396 </tbody></table> | |
| 397 <h2 id="examples">Examples</h2> | |
| 398 <p> | |
| 399 For examples of using this API, see the | |
| 400 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extension
s/docs/examples/api/history/">history sample directory</a> and the | |
| 401 <a href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extens
ions/api_test/history/">history API test directory</a>. | |
| 402 For other examples and for help in viewing the source code, see | |
| 403 <a href="samples.html">Samples</a>. | |
| 404 </p> | |
| 405 <!-- END AUTHORED CONTENT --> | |
| 406 </div> | |
| 407 <!-- API PAGE --> | |
| 408 <div class="apiPage"> | |
| 409 <a name="apiReference"></a> | |
| 410 <h2>API reference: chrome.history</h2> | |
| 411 <!-- PROPERTIES --> | |
| 412 <!-- /apiGroup --> | |
| 413 <!-- METHODS --> | |
| 414 <div id="methodsTemplate" class="apiGroup"> | |
| 415 <a name="global-methods"></a> | |
| 416 <h3>Methods</h3> | |
| 417 <!-- iterates over all functions --> | |
| 418 <div class="apiItem"> | |
| 419 <a name="method-addUrl"></a> <!-- method-anchor --> | |
| 420 <h4>addUrl</h4> | |
| 421 <div class="summary"> | |
| 422 <!-- Note: intentionally longer 80 columns --> | |
| 423 <span>chrome.history.addUrl</span>(<span class="null"><span>ob
ject</span> | |
| 424 <var><span>details</span></var></span><span class="optiona
l"><span>, </span><span>function</span> | |
| 425 <var><span>callback</span></var></span>)</div> | |
| 426 <div class="description"> | |
| 427 <p>Adds a URL to the history at the current time with a <a href=
"#transition_types">transition type</a> of "link".</p> | |
| 428 <!-- PARAMETERS --> | |
| 429 <h4>Parameters</h4> | |
| 430 <dl> | |
| 431 <div> | |
| 432 <div> | |
| 433 <dt> | |
| 434 <var>details</var> | |
| 435 <em> | |
| 436 <!-- TYPE --> | |
| 437 <div style="display:inline"> | |
| 438 ( | |
| 439 <span id="typeTemplate"> | |
| 440 <span> | |
| 441 <span>object</span> | |
| 442 </span> | |
| 443 </span> | |
| 444 ) | |
| 445 </div> | |
| 446 </em> | |
| 447 </dt> | |
| 448 <dd class="todo"> | |
| 449 Undocumented. | |
| 450 </dd> | |
| 451 <!-- OBJECT PROPERTIES --> | |
| 452 <dd> | |
| 453 <dl> | |
| 454 <div> | |
| 455 <div> | |
| 456 <dt> | |
| 457 <var>url</var> | |
| 458 <em> | |
| 459 <!-- TYPE --> | |
| 460 <div style="display:inline"> | |
| 461 ( | |
| 462 <span id="typeTemplate"> | |
| 463 <span> | |
| 464 <span>string</span> | |
| 465 </span> | |
| 466 </span> | |
| 467 ) | |
| 468 </div> | |
| 469 </em> | |
| 470 </dt> | |
| 471 <dd>The URL to add.</dd> | |
| 472 <!-- OBJECT PROPERTIES --> | |
| 473 <!-- OBJECT METHODS --> | |
| 474 <!-- OBJECT EVENT FIELDS --> | |
| 475 <!-- FUNCTION PARAMETERS --> | |
| 476 </div> | |
| 477 </div> | |
| 478 </dl> | |
| 479 </dd> | |
| 480 <!-- OBJECT METHODS --> | |
| 481 <!-- OBJECT EVENT FIELDS --> | |
| 482 <!-- FUNCTION PARAMETERS --> | |
| 483 </div> | |
| 484 </div><div> | |
| 485 <div> | |
| 486 <dt> | |
| 487 <var>callback</var> | |
| 488 <em> | |
| 489 <!-- TYPE --> | |
| 490 <div style="display:inline"> | |
| 491 ( | |
| 492 <span class="optional">optional</span> | |
| 493 <span id="typeTemplate"> | |
| 494 <span> | |
| 495 <span>function</span> | |
| 496 </span> | |
| 497 </span> | |
| 498 ) | |
| 499 </div> | |
| 500 </em> | |
| 501 </dt> | |
| 502 <dd class="todo"> | |
| 503 Undocumented. | |
| 504 </dd> | |
| 505 <!-- OBJECT PROPERTIES --> | |
| 506 <!-- OBJECT METHODS --> | |
| 507 <!-- OBJECT EVENT FIELDS --> | |
| 508 <!-- FUNCTION PARAMETERS --> | |
| 509 </div> | |
| 510 </div> | |
| 511 </dl> | |
| 512 <!-- RETURNS --> | |
| 513 <dl> | |
| 514 </dl> | |
| 515 <!-- CALLBACK --> | |
| 516 <div> | |
| 517 <div> | |
| 518 <h4>Callback function</h4> | |
| 519 <p> | |
| 520 If you specify the <em>callback</em> parameter, it should | |
| 521 specify a function that looks like this: | |
| 522 </p> | |
| 523 <!-- Note: intentionally longer 80 columns --> | |
| 524 <pre>function(<span></span>) <span class="subdued">{...}</span
>;</pre> | |
| 525 <dl> | |
| 526 </dl> | |
| 527 </div> | |
| 528 </div> | |
| 529 <!-- MIN_VERSION --> | |
| 530 </div> <!-- /description --> | |
| 531 </div><div class="apiItem"> | |
| 532 <a name="method-deleteAll"></a> <!-- method-anchor --> | |
| 533 <h4>deleteAll</h4> | |
| 534 <div class="summary"> | |
| 535 <!-- Note: intentionally longer 80 columns --> | |
| 536 <span>chrome.history.deleteAll</span>(<span class="null"><span
>function</span> | |
| 537 <var><span>callback</span></var></span>)</div> | |
| 538 <div class="description"> | |
| 539 <p>Deletes all items from the history.</p> | |
| 540 <!-- PARAMETERS --> | |
| 541 <h4>Parameters</h4> | |
| 542 <dl> | |
| 543 <div> | |
| 544 <div> | |
| 545 <dt> | |
| 546 <var>callback</var> | |
| 547 <em> | |
| 548 <!-- TYPE --> | |
| 549 <div style="display:inline"> | |
| 550 ( | |
| 551 <span id="typeTemplate"> | |
| 552 <span> | |
| 553 <span>function</span> | |
| 554 </span> | |
| 555 </span> | |
| 556 ) | |
| 557 </div> | |
| 558 </em> | |
| 559 </dt> | |
| 560 <dd class="todo"> | |
| 561 Undocumented. | |
| 562 </dd> | |
| 563 <!-- OBJECT PROPERTIES --> | |
| 564 <!-- OBJECT METHODS --> | |
| 565 <!-- OBJECT EVENT FIELDS --> | |
| 566 <!-- FUNCTION PARAMETERS --> | |
| 567 </div> | |
| 568 </div> | |
| 569 </dl> | |
| 570 <!-- RETURNS --> | |
| 571 <dl> | |
| 572 </dl> | |
| 573 <!-- CALLBACK --> | |
| 574 <div> | |
| 575 <div> | |
| 576 <h4>Callback function</h4> | |
| 577 <p> | |
| 578 The <em>callback</em> parameter should specify a function | |
| 579 that looks like this: | |
| 580 </p> | |
| 581 <!-- Note: intentionally longer 80 columns --> | |
| 582 <pre>function(<span></span>) <span class="subdued">{...}</span
>;</pre> | |
| 583 <dl> | |
| 584 </dl> | |
| 585 </div> | |
| 586 </div> | |
| 587 <!-- MIN_VERSION --> | |
| 588 </div> <!-- /description --> | |
| 589 </div><div class="apiItem"> | |
| 590 <a name="method-deleteRange"></a> <!-- method-anchor --> | |
| 591 <h4>deleteRange</h4> | |
| 592 <div class="summary"> | |
| 593 <!-- Note: intentionally longer 80 columns --> | |
| 594 <span>chrome.history.deleteRange</span>(<span class="null"><sp
an>object</span> | |
| 595 <var><span>range</span></var></span><span class="null"><sp
an>, </span><span>function</span> | |
| 596 <var><span>callback</span></var></span>)</div> | |
| 597 <div class="description"> | |
| 598 <p>Removes all items within the specified date range from the hi
story. Pages will not be removed from the history unless all visits fall within
the range.</p> | |
| 599 <!-- PARAMETERS --> | |
| 600 <h4>Parameters</h4> | |
| 601 <dl> | |
| 602 <div> | |
| 603 <div> | |
| 604 <dt> | |
| 605 <var>range</var> | |
| 606 <em> | |
| 607 <!-- TYPE --> | |
| 608 <div style="display:inline"> | |
| 609 ( | |
| 610 <span id="typeTemplate"> | |
| 611 <span> | |
| 612 <span>object</span> | |
| 613 </span> | |
| 614 </span> | |
| 615 ) | |
| 616 </div> | |
| 617 </em> | |
| 618 </dt> | |
| 619 <dd class="todo"> | |
| 620 Undocumented. | |
| 621 </dd> | |
| 622 <!-- OBJECT PROPERTIES --> | |
| 623 <dd> | |
| 624 <dl> | |
| 625 <div> | |
| 626 <div> | |
| 627 <dt> | |
| 628 <var>startTime</var> | |
| 629 <em> | |
| 630 <!-- TYPE --> | |
| 631 <div style="display:inline"> | |
| 632 ( | |
| 633 <span id="typeTemplate"> | |
| 634 <span> | |
| 635 <span>number</span> | |
| 636 </span> | |
| 637 </span> | |
| 638 ) | |
| 639 </div> | |
| 640 </em> | |
| 641 </dt> | |
| 642 <dd>Items added to history after this date, represented in millisecond
s since the epoch.</dd> | |
| 643 <!-- OBJECT PROPERTIES --> | |
| 644 <!-- OBJECT METHODS --> | |
| 645 <!-- OBJECT EVENT FIELDS --> | |
| 646 <!-- FUNCTION PARAMETERS --> | |
| 647 </div> | |
| 648 </div><div> | |
| 649 <div> | |
| 650 <dt> | |
| 651 <var>endTime</var> | |
| 652 <em> | |
| 653 <!-- TYPE --> | |
| 654 <div style="display:inline"> | |
| 655 ( | |
| 656 <span id="typeTemplate"> | |
| 657 <span> | |
| 658 <span>number</span> | |
| 659 </span> | |
| 660 </span> | |
| 661 ) | |
| 662 </div> | |
| 663 </em> | |
| 664 </dt> | |
| 665 <dd>Items added to history before this date, represented in millisecon
ds since the epoch.</dd> | |
| 666 <!-- OBJECT PROPERTIES --> | |
| 667 <!-- OBJECT METHODS --> | |
| 668 <!-- OBJECT EVENT FIELDS --> | |
| 669 <!-- FUNCTION PARAMETERS --> | |
| 670 </div> | |
| 671 </div> | |
| 672 </dl> | |
| 673 </dd> | |
| 674 <!-- OBJECT METHODS --> | |
| 675 <!-- OBJECT EVENT FIELDS --> | |
| 676 <!-- FUNCTION PARAMETERS --> | |
| 677 </div> | |
| 678 </div><div> | |
| 679 <div> | |
| 680 <dt> | |
| 681 <var>callback</var> | |
| 682 <em> | |
| 683 <!-- TYPE --> | |
| 684 <div style="display:inline"> | |
| 685 ( | |
| 686 <span id="typeTemplate"> | |
| 687 <span> | |
| 688 <span>function</span> | |
| 689 </span> | |
| 690 </span> | |
| 691 ) | |
| 692 </div> | |
| 693 </em> | |
| 694 </dt> | |
| 695 <dd class="todo"> | |
| 696 Undocumented. | |
| 697 </dd> | |
| 698 <!-- OBJECT PROPERTIES --> | |
| 699 <!-- OBJECT METHODS --> | |
| 700 <!-- OBJECT EVENT FIELDS --> | |
| 701 <!-- FUNCTION PARAMETERS --> | |
| 702 </div> | |
| 703 </div> | |
| 704 </dl> | |
| 705 <!-- RETURNS --> | |
| 706 <dl> | |
| 707 </dl> | |
| 708 <!-- CALLBACK --> | |
| 709 <div> | |
| 710 <div> | |
| 711 <h4>Callback function</h4> | |
| 712 <p> | |
| 713 The <em>callback</em> parameter should specify a function | |
| 714 that looks like this: | |
| 715 </p> | |
| 716 <!-- Note: intentionally longer 80 columns --> | |
| 717 <pre>function(<span></span>) <span class="subdued">{...}</span
>;</pre> | |
| 718 <dl> | |
| 719 </dl> | |
| 720 </div> | |
| 721 </div> | |
| 722 <!-- MIN_VERSION --> | |
| 723 </div> <!-- /description --> | |
| 724 </div><div class="apiItem"> | |
| 725 <a name="method-deleteUrl"></a> <!-- method-anchor --> | |
| 726 <h4>deleteUrl</h4> | |
| 727 <div class="summary"> | |
| 728 <!-- Note: intentionally longer 80 columns --> | |
| 729 <span>chrome.history.deleteUrl</span>(<span class="null"><span
>object</span> | |
| 730 <var><span>details</span></var></span><span class="optiona
l"><span>, </span><span>function</span> | |
| 731 <var><span>callback</span></var></span>)</div> | |
| 732 <div class="description"> | |
| 733 <p>Removes all occurrences of the given URL from the history.</p
> | |
| 734 <!-- PARAMETERS --> | |
| 735 <h4>Parameters</h4> | |
| 736 <dl> | |
| 737 <div> | |
| 738 <div> | |
| 739 <dt> | |
| 740 <var>details</var> | |
| 741 <em> | |
| 742 <!-- TYPE --> | |
| 743 <div style="display:inline"> | |
| 744 ( | |
| 745 <span id="typeTemplate"> | |
| 746 <span> | |
| 747 <span>object</span> | |
| 748 </span> | |
| 749 </span> | |
| 750 ) | |
| 751 </div> | |
| 752 </em> | |
| 753 </dt> | |
| 754 <dd class="todo"> | |
| 755 Undocumented. | |
| 756 </dd> | |
| 757 <!-- OBJECT PROPERTIES --> | |
| 758 <dd> | |
| 759 <dl> | |
| 760 <div> | |
| 761 <div> | |
| 762 <dt> | |
| 763 <var>url</var> | |
| 764 <em> | |
| 765 <!-- TYPE --> | |
| 766 <div style="display:inline"> | |
| 767 ( | |
| 768 <span id="typeTemplate"> | |
| 769 <span> | |
| 770 <span>string</span> | |
| 771 </span> | |
| 772 </span> | |
| 773 ) | |
| 774 </div> | |
| 775 </em> | |
| 776 </dt> | |
| 777 <dd>The URL to remove.</dd> | |
| 778 <!-- OBJECT PROPERTIES --> | |
| 779 <!-- OBJECT METHODS --> | |
| 780 <!-- OBJECT EVENT FIELDS --> | |
| 781 <!-- FUNCTION PARAMETERS --> | |
| 782 </div> | |
| 783 </div> | |
| 784 </dl> | |
| 785 </dd> | |
| 786 <!-- OBJECT METHODS --> | |
| 787 <!-- OBJECT EVENT FIELDS --> | |
| 788 <!-- FUNCTION PARAMETERS --> | |
| 789 </div> | |
| 790 </div><div> | |
| 791 <div> | |
| 792 <dt> | |
| 793 <var>callback</var> | |
| 794 <em> | |
| 795 <!-- TYPE --> | |
| 796 <div style="display:inline"> | |
| 797 ( | |
| 798 <span class="optional">optional</span> | |
| 799 <span id="typeTemplate"> | |
| 800 <span> | |
| 801 <span>function</span> | |
| 802 </span> | |
| 803 </span> | |
| 804 ) | |
| 805 </div> | |
| 806 </em> | |
| 807 </dt> | |
| 808 <dd class="todo"> | |
| 809 Undocumented. | |
| 810 </dd> | |
| 811 <!-- OBJECT PROPERTIES --> | |
| 812 <!-- OBJECT METHODS --> | |
| 813 <!-- OBJECT EVENT FIELDS --> | |
| 814 <!-- FUNCTION PARAMETERS --> | |
| 815 </div> | |
| 816 </div> | |
| 817 </dl> | |
| 818 <!-- RETURNS --> | |
| 819 <dl> | |
| 820 </dl> | |
| 821 <!-- CALLBACK --> | |
| 822 <div> | |
| 823 <div> | |
| 824 <h4>Callback function</h4> | |
| 825 <p> | |
| 826 If you specify the <em>callback</em> parameter, it should | |
| 827 specify a function that looks like this: | |
| 828 </p> | |
| 829 <!-- Note: intentionally longer 80 columns --> | |
| 830 <pre>function(<span></span>) <span class="subdued">{...}</span
>;</pre> | |
| 831 <dl> | |
| 832 </dl> | |
| 833 </div> | |
| 834 </div> | |
| 835 <!-- MIN_VERSION --> | |
| 836 </div> <!-- /description --> | |
| 837 </div><div class="apiItem"> | |
| 838 <a name="method-getVisits"></a> <!-- method-anchor --> | |
| 839 <h4>getVisits</h4> | |
| 840 <div class="summary"> | |
| 841 <!-- Note: intentionally longer 80 columns --> | |
| 842 <span>chrome.history.getVisits</span>(<span class="null"><span
>object</span> | |
| 843 <var><span>details</span></var></span><span class="null"><
span>, </span><span>function</span> | |
| 844 <var><span>callback</span></var></span>)</div> | |
| 845 <div class="description"> | |
| 846 <p>Retrieves information about visits to a URL.</p> | |
| 847 <!-- PARAMETERS --> | |
| 848 <h4>Parameters</h4> | |
| 849 <dl> | |
| 850 <div> | |
| 851 <div> | |
| 852 <dt> | |
| 853 <var>details</var> | |
| 854 <em> | |
| 855 <!-- TYPE --> | |
| 856 <div style="display:inline"> | |
| 857 ( | |
| 858 <span id="typeTemplate"> | |
| 859 <span> | |
| 860 <span>object</span> | |
| 861 </span> | |
| 862 </span> | |
| 863 ) | |
| 864 </div> | |
| 865 </em> | |
| 866 </dt> | |
| 867 <dd class="todo"> | |
| 868 Undocumented. | |
| 869 </dd> | |
| 870 <!-- OBJECT PROPERTIES --> | |
| 871 <dd> | |
| 872 <dl> | |
| 873 <div> | |
| 874 <div> | |
| 875 <dt> | |
| 876 <var>url</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>The URL for which to retrieve visit information. It must be in th
e format as returned from a call to history.search.</dd> | |
| 891 <!-- OBJECT PROPERTIES --> | |
| 892 <!-- OBJECT METHODS --> | |
| 893 <!-- OBJECT EVENT FIELDS --> | |
| 894 <!-- FUNCTION PARAMETERS --> | |
| 895 </div> | |
| 896 </div> | |
| 897 </dl> | |
| 898 </dd> | |
| 899 <!-- OBJECT METHODS --> | |
| 900 <!-- OBJECT EVENT FIELDS --> | |
| 901 <!-- FUNCTION PARAMETERS --> | |
| 902 </div> | |
| 903 </div><div> | |
| 904 <div> | |
| 905 <dt> | |
| 906 <var>callback</var> | |
| 907 <em> | |
| 908 <!-- TYPE --> | |
| 909 <div style="display:inline"> | |
| 910 ( | |
| 911 <span id="typeTemplate"> | |
| 912 <span> | |
| 913 <span>function</span> | |
| 914 </span> | |
| 915 </span> | |
| 916 ) | |
| 917 </div> | |
| 918 </em> | |
| 919 </dt> | |
| 920 <dd class="todo"> | |
| 921 Undocumented. | |
| 922 </dd> | |
| 923 <!-- OBJECT PROPERTIES --> | |
| 924 <!-- OBJECT METHODS --> | |
| 925 <!-- OBJECT EVENT FIELDS --> | |
| 926 <!-- FUNCTION PARAMETERS --> | |
| 927 </div> | |
| 928 </div> | |
| 929 </dl> | |
| 930 <!-- RETURNS --> | |
| 931 <dl> | |
| 932 </dl> | |
| 933 <!-- CALLBACK --> | |
| 934 <div> | |
| 935 <div> | |
| 936 <h4>Callback function</h4> | |
| 937 <p> | |
| 938 The <em>callback</em> parameter should specify a function | |
| 939 that looks like this: | |
| 940 </p> | |
| 941 <!-- Note: intentionally longer 80 columns --> | |
| 942 <pre>function(<span>array of VisitItem results</span>) <span c
lass="subdued">{...}</span>;</pre> | |
| 943 <dl> | |
| 944 <div> | |
| 945 <div> | |
| 946 <dt> | |
| 947 <var>results</var> | |
| 948 <em> | |
| 949 <!-- TYPE --> | |
| 950 <div style="display:inline"> | |
| 951 ( | |
| 952 <span id="typeTemplate"> | |
| 953 <span> | |
| 954 <span> | |
| 955 array of <span><span> | |
| 956 <span> | |
| 957 <a href="history.html#type-VisitItem">VisitItem</a> | |
| 958 </span> | |
| 959 </span></span> | |
| 960 </span> | |
| 961 </span> | |
| 962 </span> | |
| 963 ) | |
| 964 </div> | |
| 965 </em> | |
| 966 </dt> | |
| 967 <dd class="todo"> | |
| 968 Undocumented. | |
| 969 </dd> | |
| 970 <!-- OBJECT PROPERTIES --> | |
| 971 <!-- OBJECT METHODS --> | |
| 972 <!-- OBJECT EVENT FIELDS --> | |
| 973 <!-- FUNCTION PARAMETERS --> | |
| 974 </div> | |
| 975 </div> | |
| 976 </dl> | |
| 977 </div> | |
| 978 </div> | |
| 979 <!-- MIN_VERSION --> | |
| 980 </div> <!-- /description --> | |
| 981 </div><div class="apiItem"> | |
| 982 <a name="method-search"></a> <!-- method-anchor --> | |
| 983 <h4>search</h4> | |
| 984 <div class="summary"> | |
| 985 <!-- Note: intentionally longer 80 columns --> | |
| 986 <span>chrome.history.search</span>(<span class="null"><span>ob
ject</span> | |
| 987 <var><span>query</span></var></span><span class="null"><sp
an>, </span><span>function</span> | |
| 988 <var><span>callback</span></var></span>)</div> | |
| 989 <div class="description"> | |
| 990 <p>Searches the history for the last visit time of each page mat
ching the query.</p> | |
| 991 <!-- PARAMETERS --> | |
| 992 <h4>Parameters</h4> | |
| 993 <dl> | |
| 994 <div> | |
| 995 <div> | |
| 996 <dt> | |
| 997 <var>query</var> | |
| 998 <em> | |
| 999 <!-- TYPE --> | |
| 1000 <div style="display:inline"> | |
| 1001 ( | |
| 1002 <span id="typeTemplate"> | |
| 1003 <span> | |
| 1004 <span>object</span> | |
| 1005 </span> | |
| 1006 </span> | |
| 1007 ) | |
| 1008 </div> | |
| 1009 </em> | |
| 1010 </dt> | |
| 1011 <dd class="todo"> | |
| 1012 Undocumented. | |
| 1013 </dd> | |
| 1014 <!-- OBJECT PROPERTIES --> | |
| 1015 <dd> | |
| 1016 <dl> | |
| 1017 <div> | |
| 1018 <div> | |
| 1019 <dt> | |
| 1020 <var>text</var> | |
| 1021 <em> | |
| 1022 <!-- TYPE --> | |
| 1023 <div style="display:inline"> | |
| 1024 ( | |
| 1025 <span id="typeTemplate"> | |
| 1026 <span> | |
| 1027 <span>string</span> | |
| 1028 </span> | |
| 1029 </span> | |
| 1030 ) | |
| 1031 </div> | |
| 1032 </em> | |
| 1033 </dt> | |
| 1034 <dd>A free-text query to the history service. Leave empty to retrieve
all pages.</dd> | |
| 1035 <!-- OBJECT PROPERTIES --> | |
| 1036 <!-- OBJECT METHODS --> | |
| 1037 <!-- OBJECT EVENT FIELDS --> | |
| 1038 <!-- FUNCTION PARAMETERS --> | |
| 1039 </div> | |
| 1040 </div><div> | |
| 1041 <div> | |
| 1042 <dt> | |
| 1043 <var>startTime</var> | |
| 1044 <em> | |
| 1045 <!-- TYPE --> | |
| 1046 <div style="display:inline"> | |
| 1047 ( | |
| 1048 <span class="optional">optional</span> | |
| 1049 <span id="typeTemplate"> | |
| 1050 <span> | |
| 1051 <span>number</span> | |
| 1052 </span> | |
| 1053 </span> | |
| 1054 ) | |
| 1055 </div> | |
| 1056 </em> | |
| 1057 </dt> | |
| 1058 <dd>Limit results to those visited after this date, represented in mil
liseconds since the epoch.</dd> | |
| 1059 <!-- OBJECT PROPERTIES --> | |
| 1060 <!-- OBJECT METHODS --> | |
| 1061 <!-- OBJECT EVENT FIELDS --> | |
| 1062 <!-- FUNCTION PARAMETERS --> | |
| 1063 </div> | |
| 1064 </div><div> | |
| 1065 <div> | |
| 1066 <dt> | |
| 1067 <var>endTime</var> | |
| 1068 <em> | |
| 1069 <!-- TYPE --> | |
| 1070 <div style="display:inline"> | |
| 1071 ( | |
| 1072 <span class="optional">optional</span> | |
| 1073 <span id="typeTemplate"> | |
| 1074 <span> | |
| 1075 <span>number</span> | |
| 1076 </span> | |
| 1077 </span> | |
| 1078 ) | |
| 1079 </div> | |
| 1080 </em> | |
| 1081 </dt> | |
| 1082 <dd>Limit results to those visited before this date, represented in mi
lliseconds since the epoch.</dd> | |
| 1083 <!-- OBJECT PROPERTIES --> | |
| 1084 <!-- OBJECT METHODS --> | |
| 1085 <!-- OBJECT EVENT FIELDS --> | |
| 1086 <!-- FUNCTION PARAMETERS --> | |
| 1087 </div> | |
| 1088 </div><div> | |
| 1089 <div> | |
| 1090 <dt> | |
| 1091 <var>maxResults</var> | |
| 1092 <em> | |
| 1093 <!-- TYPE --> | |
| 1094 <div style="display:inline"> | |
| 1095 ( | |
| 1096 <span class="optional">optional</span> | |
| 1097 <span id="typeTemplate"> | |
| 1098 <span> | |
| 1099 <span>integer</span> | |
| 1100 </span> | |
| 1101 </span> | |
| 1102 ) | |
| 1103 </div> | |
| 1104 </em> | |
| 1105 </dt> | |
| 1106 <dd>The maximum number of results to retrieve. Defaults to 100.</dd> | |
| 1107 <!-- OBJECT PROPERTIES --> | |
| 1108 <!-- OBJECT METHODS --> | |
| 1109 <!-- OBJECT EVENT FIELDS --> | |
| 1110 <!-- FUNCTION PARAMETERS --> | |
| 1111 </div> | |
| 1112 </div> | |
| 1113 </dl> | |
| 1114 </dd> | |
| 1115 <!-- OBJECT METHODS --> | |
| 1116 <!-- OBJECT EVENT FIELDS --> | |
| 1117 <!-- FUNCTION PARAMETERS --> | |
| 1118 </div> | |
| 1119 </div><div> | |
| 1120 <div> | |
| 1121 <dt> | |
| 1122 <var>callback</var> | |
| 1123 <em> | |
| 1124 <!-- TYPE --> | |
| 1125 <div style="display:inline"> | |
| 1126 ( | |
| 1127 <span id="typeTemplate"> | |
| 1128 <span> | |
| 1129 <span>function</span> | |
| 1130 </span> | |
| 1131 </span> | |
| 1132 ) | |
| 1133 </div> | |
| 1134 </em> | |
| 1135 </dt> | |
| 1136 <dd class="todo"> | |
| 1137 Undocumented. | |
| 1138 </dd> | |
| 1139 <!-- OBJECT PROPERTIES --> | |
| 1140 <!-- OBJECT METHODS --> | |
| 1141 <!-- OBJECT EVENT FIELDS --> | |
| 1142 <!-- FUNCTION PARAMETERS --> | |
| 1143 </div> | |
| 1144 </div> | |
| 1145 </dl> | |
| 1146 <!-- RETURNS --> | |
| 1147 <dl> | |
| 1148 </dl> | |
| 1149 <!-- CALLBACK --> | |
| 1150 <div> | |
| 1151 <div> | |
| 1152 <h4>Callback function</h4> | |
| 1153 <p> | |
| 1154 The <em>callback</em> parameter should specify a function | |
| 1155 that looks like this: | |
| 1156 </p> | |
| 1157 <!-- Note: intentionally longer 80 columns --> | |
| 1158 <pre>function(<span>array of HistoryItem results</span>) <span
class="subdued">{...}</span>;</pre> | |
| 1159 <dl> | |
| 1160 <div> | |
| 1161 <div> | |
| 1162 <dt> | |
| 1163 <var>results</var> | |
| 1164 <em> | |
| 1165 <!-- TYPE --> | |
| 1166 <div style="display:inline"> | |
| 1167 ( | |
| 1168 <span id="typeTemplate"> | |
| 1169 <span> | |
| 1170 <span> | |
| 1171 array of <span><span> | |
| 1172 <span> | |
| 1173 <a href="history.html#type-HistoryItem">HistoryItem</a> | |
| 1174 </span> | |
| 1175 </span></span> | |
| 1176 </span> | |
| 1177 </span> | |
| 1178 </span> | |
| 1179 ) | |
| 1180 </div> | |
| 1181 </em> | |
| 1182 </dt> | |
| 1183 <dd class="todo"> | |
| 1184 Undocumented. | |
| 1185 </dd> | |
| 1186 <!-- OBJECT PROPERTIES --> | |
| 1187 <!-- OBJECT METHODS --> | |
| 1188 <!-- OBJECT EVENT FIELDS --> | |
| 1189 <!-- FUNCTION PARAMETERS --> | |
| 1190 </div> | |
| 1191 </div> | |
| 1192 </dl> | |
| 1193 </div> | |
| 1194 </div> | |
| 1195 <!-- MIN_VERSION --> | |
| 1196 </div> <!-- /description --> | |
| 1197 </div> <!-- /apiItem --> | |
| 1198 </div> <!-- /apiGroup --> | |
| 1199 <!-- EVENTS --> | |
| 1200 <div id="eventsTemplate" class="apiGroup"> | |
| 1201 <a name="global-events"></a> | |
| 1202 <h3>Events</h3> | |
| 1203 <!-- iterates over all events --> | |
| 1204 <div class="apiItem"> | |
| 1205 <a name="event-onVisitRemoved"></a> | |
| 1206 <h4>onVisitRemoved</h4> | |
| 1207 <div class="summary"> | |
| 1208 <!-- Note: intentionally longer 80 columns --> | |
| 1209 <span class="subdued">chrome.history.</span><span>onVisitRemoved
</span><span class="subdued">.addListener</span>(function(<span>object removed</
span>) <span class="subdued">{...}</span><span></span>); | |
| 1210 </div> | |
| 1211 <div class="description"> | |
| 1212 <p>Fired when one or more URLs are removed from the history serv
ice. When all visits have been removed the URL is purged from history.</p> | |
| 1213 <!-- LISTENER PARAMETERS --> | |
| 1214 <div> | |
| 1215 <h4>Listener parameters</h4> | |
| 1216 <dl> | |
| 1217 <div> | |
| 1218 <div> | |
| 1219 <dt> | |
| 1220 <var>removed</var> | |
| 1221 <em> | |
| 1222 <!-- TYPE --> | |
| 1223 <div style="display:inline"> | |
| 1224 ( | |
| 1225 <span id="typeTemplate"> | |
| 1226 <span> | |
| 1227 <span>object</span> | |
| 1228 </span> | |
| 1229 </span> | |
| 1230 ) | |
| 1231 </div> | |
| 1232 </em> | |
| 1233 </dt> | |
| 1234 <dd class="todo"> | |
| 1235 Undocumented. | |
| 1236 </dd> | |
| 1237 <!-- OBJECT PROPERTIES --> | |
| 1238 <dd> | |
| 1239 <dl> | |
| 1240 <div> | |
| 1241 <div> | |
| 1242 <dt> | |
| 1243 <var>allHistory</var> | |
| 1244 <em> | |
| 1245 <!-- TYPE --> | |
| 1246 <div style="display:inline"> | |
| 1247 ( | |
| 1248 <span id="typeTemplate"> | |
| 1249 <span> | |
| 1250 <span>boolean</span> | |
| 1251 </span> | |
| 1252 </span> | |
| 1253 ) | |
| 1254 </div> | |
| 1255 </em> | |
| 1256 </dt> | |
| 1257 <dd>True if all history was removed. If true, then urls will be empty
.</dd> | |
| 1258 <!-- OBJECT PROPERTIES --> | |
| 1259 <!-- OBJECT METHODS --> | |
| 1260 <!-- OBJECT EVENT FIELDS --> | |
| 1261 <!-- FUNCTION PARAMETERS --> | |
| 1262 </div> | |
| 1263 </div><div> | |
| 1264 <div> | |
| 1265 <dt> | |
| 1266 <var>urls</var> | |
| 1267 <em> | |
| 1268 <!-- TYPE --> | |
| 1269 <div style="display:inline"> | |
| 1270 ( | |
| 1271 <span class="optional">optional</span> | |
| 1272 <span id="typeTemplate"> | |
| 1273 <span> | |
| 1274 <span> | |
| 1275 array of <span><span> | |
| 1276 <span> | |
| 1277 <span>string</span> | |
| 1278 </span> | |
| 1279 </span></span> | |
| 1280 </span> | |
| 1281 </span> | |
| 1282 </span> | |
| 1283 ) | |
| 1284 </div> | |
| 1285 </em> | |
| 1286 </dt> | |
| 1287 <dd class="todo"> | |
| 1288 Undocumented. | |
| 1289 </dd> | |
| 1290 <!-- OBJECT PROPERTIES --> | |
| 1291 <!-- OBJECT METHODS --> | |
| 1292 <!-- OBJECT EVENT FIELDS --> | |
| 1293 <!-- FUNCTION PARAMETERS --> | |
| 1294 </div> | |
| 1295 </div> | |
| 1296 </dl> | |
| 1297 </dd> | |
| 1298 <!-- OBJECT METHODS --> | |
| 1299 <!-- OBJECT EVENT FIELDS --> | |
| 1300 <!-- FUNCTION PARAMETERS --> | |
| 1301 </div> | |
| 1302 </div> | |
| 1303 </dl> | |
| 1304 </div> | |
| 1305 <!-- EXTRA PARAMETERS --> | |
| 1306 <!-- LISTENER RETURN VALUE --> | |
| 1307 <dl> | |
| 1308 </dl> | |
| 1309 </div> <!-- /description --> | |
| 1310 <!-- /description --> | |
| 1311 </div><div class="apiItem"> | |
| 1312 <a name="event-onVisited"></a> | |
| 1313 <h4>onVisited</h4> | |
| 1314 <div class="summary"> | |
| 1315 <!-- Note: intentionally longer 80 columns --> | |
| 1316 <span class="subdued">chrome.history.</span><span>onVisited</spa
n><span class="subdued">.addListener</span>(function(<span>HistoryItem result</s
pan>) <span class="subdued">{...}</span><span></span>); | |
| 1317 </div> | |
| 1318 <div class="description"> | |
| 1319 <p>Fired when a URL is visited, providing the HistoryItem data f
or that URL. This event fires before the page has loaded.</p> | |
| 1320 <!-- LISTENER PARAMETERS --> | |
| 1321 <div> | |
| 1322 <h4>Listener parameters</h4> | |
| 1323 <dl> | |
| 1324 <div> | |
| 1325 <div> | |
| 1326 <dt> | |
| 1327 <var>result</var> | |
| 1328 <em> | |
| 1329 <!-- TYPE --> | |
| 1330 <div style="display:inline"> | |
| 1331 ( | |
| 1332 <span id="typeTemplate"> | |
| 1333 <span> | |
| 1334 <a href="history.html#type-HistoryItem">HistoryItem</a> | |
| 1335 </span> | |
| 1336 </span> | |
| 1337 ) | |
| 1338 </div> | |
| 1339 </em> | |
| 1340 </dt> | |
| 1341 <dd class="todo"> | |
| 1342 Undocumented. | |
| 1343 </dd> | |
| 1344 <!-- OBJECT PROPERTIES --> | |
| 1345 <!-- OBJECT METHODS --> | |
| 1346 <!-- OBJECT EVENT FIELDS --> | |
| 1347 <!-- FUNCTION PARAMETERS --> | |
| 1348 </div> | |
| 1349 </div> | |
| 1350 </dl> | |
| 1351 </div> | |
| 1352 <!-- EXTRA PARAMETERS --> | |
| 1353 <!-- LISTENER RETURN VALUE --> | |
| 1354 <dl> | |
| 1355 </dl> | |
| 1356 </div> <!-- /description --> | |
| 1357 <!-- /description --> | |
| 1358 </div> <!-- /apiItem --> | |
| 1359 </div> <!-- /apiGroup --> | |
| 1360 <!-- TYPES --> | |
| 1361 <div class="apiGroup"> | |
| 1362 <a name="types"></a> | |
| 1363 <h3 id="types">Types</h3> | |
| 1364 <!-- iterates over all types --> | |
| 1365 <div class="apiItem"> | |
| 1366 <a name="type-HistoryItem"></a> | |
| 1367 <h4>HistoryItem</h4> | |
| 1368 <div> | |
| 1369 <dt> | |
| 1370 <em> | |
| 1371 <!-- TYPE --> | |
| 1372 <div style="display:inline"> | |
| 1373 ( | |
| 1374 <span id="typeTemplate"> | |
| 1375 <span> | |
| 1376 <span>object</span> | |
| 1377 </span> | |
| 1378 </span> | |
| 1379 ) | |
| 1380 </div> | |
| 1381 </em> | |
| 1382 </dt> | |
| 1383 <dd>An object encapsulating one result of a history query.</dd> | |
| 1384 <!-- OBJECT PROPERTIES --> | |
| 1385 <dd> | |
| 1386 <dl> | |
| 1387 <div> | |
| 1388 <div> | |
| 1389 <dt> | |
| 1390 <var>id</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>The unique identifier for the item.</dd> | |
| 1405 <!-- OBJECT PROPERTIES --> | |
| 1406 <!-- OBJECT METHODS --> | |
| 1407 <!-- OBJECT EVENT FIELDS --> | |
| 1408 <!-- FUNCTION PARAMETERS --> | |
| 1409 </div> | |
| 1410 </div><div> | |
| 1411 <div> | |
| 1412 <dt> | |
| 1413 <var>url</var> | |
| 1414 <em> | |
| 1415 <!-- TYPE --> | |
| 1416 <div style="display:inline"> | |
| 1417 ( | |
| 1418 <span class="optional">optional</span> | |
| 1419 <span id="typeTemplate"> | |
| 1420 <span> | |
| 1421 <span>string</span> | |
| 1422 </span> | |
| 1423 </span> | |
| 1424 ) | |
| 1425 </div> | |
| 1426 </em> | |
| 1427 </dt> | |
| 1428 <dd>The URL navigated to by a user.</dd> | |
| 1429 <!-- OBJECT PROPERTIES --> | |
| 1430 <!-- OBJECT METHODS --> | |
| 1431 <!-- OBJECT EVENT FIELDS --> | |
| 1432 <!-- FUNCTION PARAMETERS --> | |
| 1433 </div> | |
| 1434 </div><div> | |
| 1435 <div> | |
| 1436 <dt> | |
| 1437 <var>title</var> | |
| 1438 <em> | |
| 1439 <!-- TYPE --> | |
| 1440 <div style="display:inline"> | |
| 1441 ( | |
| 1442 <span class="optional">optional</span> | |
| 1443 <span id="typeTemplate"> | |
| 1444 <span> | |
| 1445 <span>string</span> | |
| 1446 </span> | |
| 1447 </span> | |
| 1448 ) | |
| 1449 </div> | |
| 1450 </em> | |
| 1451 </dt> | |
| 1452 <dd>The title of the page when it was last loaded.</dd> | |
| 1453 <!-- OBJECT PROPERTIES --> | |
| 1454 <!-- OBJECT METHODS --> | |
| 1455 <!-- OBJECT EVENT FIELDS --> | |
| 1456 <!-- FUNCTION PARAMETERS --> | |
| 1457 </div> | |
| 1458 </div><div> | |
| 1459 <div> | |
| 1460 <dt> | |
| 1461 <var>lastVisitTime</var> | |
| 1462 <em> | |
| 1463 <!-- TYPE --> | |
| 1464 <div style="display:inline"> | |
| 1465 ( | |
| 1466 <span class="optional">optional</span> | |
| 1467 <span id="typeTemplate"> | |
| 1468 <span> | |
| 1469 <span>number</span> | |
| 1470 </span> | |
| 1471 </span> | |
| 1472 ) | |
| 1473 </div> | |
| 1474 </em> | |
| 1475 </dt> | |
| 1476 <dd>When this page was last loaded, represented in milliseconds since
the epoch.</dd> | |
| 1477 <!-- OBJECT PROPERTIES --> | |
| 1478 <!-- OBJECT METHODS --> | |
| 1479 <!-- OBJECT EVENT FIELDS --> | |
| 1480 <!-- FUNCTION PARAMETERS --> | |
| 1481 </div> | |
| 1482 </div><div> | |
| 1483 <div> | |
| 1484 <dt> | |
| 1485 <var>visitCount</var> | |
| 1486 <em> | |
| 1487 <!-- TYPE --> | |
| 1488 <div style="display:inline"> | |
| 1489 ( | |
| 1490 <span class="optional">optional</span> | |
| 1491 <span id="typeTemplate"> | |
| 1492 <span> | |
| 1493 <span>integer</span> | |
| 1494 </span> | |
| 1495 </span> | |
| 1496 ) | |
| 1497 </div> | |
| 1498 </em> | |
| 1499 </dt> | |
| 1500 <dd>The number of times the user has navigated to this page.</dd> | |
| 1501 <!-- OBJECT PROPERTIES --> | |
| 1502 <!-- OBJECT METHODS --> | |
| 1503 <!-- OBJECT EVENT FIELDS --> | |
| 1504 <!-- FUNCTION PARAMETERS --> | |
| 1505 </div> | |
| 1506 </div><div> | |
| 1507 <div> | |
| 1508 <dt> | |
| 1509 <var>typedCount</var> | |
| 1510 <em> | |
| 1511 <!-- TYPE --> | |
| 1512 <div style="display:inline"> | |
| 1513 ( | |
| 1514 <span class="optional">optional</span> | |
| 1515 <span id="typeTemplate"> | |
| 1516 <span> | |
| 1517 <span>integer</span> | |
| 1518 </span> | |
| 1519 </span> | |
| 1520 ) | |
| 1521 </div> | |
| 1522 </em> | |
| 1523 </dt> | |
| 1524 <dd>The number of times the user has navigated to this page by typing
in the address.</dd> | |
| 1525 <!-- OBJECT PROPERTIES --> | |
| 1526 <!-- OBJECT METHODS --> | |
| 1527 <!-- OBJECT EVENT FIELDS --> | |
| 1528 <!-- FUNCTION PARAMETERS --> | |
| 1529 </div> | |
| 1530 </div> | |
| 1531 </dl> | |
| 1532 </dd> | |
| 1533 <!-- OBJECT METHODS --> | |
| 1534 <!-- OBJECT EVENT FIELDS --> | |
| 1535 <!-- FUNCTION PARAMETERS --> | |
| 1536 </div> | |
| 1537 </div><div class="apiItem"> | |
| 1538 <a name="type-VisitItem"></a> | |
| 1539 <h4>VisitItem</h4> | |
| 1540 <div> | |
| 1541 <dt> | |
| 1542 <em> | |
| 1543 <!-- TYPE --> | |
| 1544 <div style="display:inline"> | |
| 1545 ( | |
| 1546 <span id="typeTemplate"> | |
| 1547 <span> | |
| 1548 <span>object</span> | |
| 1549 </span> | |
| 1550 </span> | |
| 1551 ) | |
| 1552 </div> | |
| 1553 </em> | |
| 1554 </dt> | |
| 1555 <dd>An object encapsulating one visit to a URL.</dd> | |
| 1556 <!-- OBJECT PROPERTIES --> | |
| 1557 <dd> | |
| 1558 <dl> | |
| 1559 <div> | |
| 1560 <div> | |
| 1561 <dt> | |
| 1562 <var>id</var> | |
| 1563 <em> | |
| 1564 <!-- TYPE --> | |
| 1565 <div style="display:inline"> | |
| 1566 ( | |
| 1567 <span id="typeTemplate"> | |
| 1568 <span> | |
| 1569 <span>string</span> | |
| 1570 </span> | |
| 1571 </span> | |
| 1572 ) | |
| 1573 </div> | |
| 1574 </em> | |
| 1575 </dt> | |
| 1576 <dd>The unique identifier for the item.</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>visitId</var> | |
| 1586 <em> | |
| 1587 <!-- TYPE --> | |
| 1588 <div style="display:inline"> | |
| 1589 ( | |
| 1590 <span id="typeTemplate"> | |
| 1591 <span> | |
| 1592 <span>string</span> | |
| 1593 </span> | |
| 1594 </span> | |
| 1595 ) | |
| 1596 </div> | |
| 1597 </em> | |
| 1598 </dt> | |
| 1599 <dd>The unique identifier for this visit.</dd> | |
| 1600 <!-- OBJECT PROPERTIES --> | |
| 1601 <!-- OBJECT METHODS --> | |
| 1602 <!-- OBJECT EVENT FIELDS --> | |
| 1603 <!-- FUNCTION PARAMETERS --> | |
| 1604 </div> | |
| 1605 </div><div> | |
| 1606 <div> | |
| 1607 <dt> | |
| 1608 <var>visitTime</var> | |
| 1609 <em> | |
| 1610 <!-- TYPE --> | |
| 1611 <div style="display:inline"> | |
| 1612 ( | |
| 1613 <span class="optional">optional</span> | |
| 1614 <span id="typeTemplate"> | |
| 1615 <span> | |
| 1616 <span>number</span> | |
| 1617 </span> | |
| 1618 </span> | |
| 1619 ) | |
| 1620 </div> | |
| 1621 </em> | |
| 1622 </dt> | |
| 1623 <dd>When this visit occurred, represented in milliseconds since the ep
och.</dd> | |
| 1624 <!-- OBJECT PROPERTIES --> | |
| 1625 <!-- OBJECT METHODS --> | |
| 1626 <!-- OBJECT EVENT FIELDS --> | |
| 1627 <!-- FUNCTION PARAMETERS --> | |
| 1628 </div> | |
| 1629 </div><div> | |
| 1630 <div> | |
| 1631 <dt> | |
| 1632 <var>referringVisitId</var> | |
| 1633 <em> | |
| 1634 <!-- TYPE --> | |
| 1635 <div style="display:inline"> | |
| 1636 ( | |
| 1637 <span id="typeTemplate"> | |
| 1638 <span> | |
| 1639 <span>string</span> | |
| 1640 </span> | |
| 1641 </span> | |
| 1642 ) | |
| 1643 </div> | |
| 1644 </em> | |
| 1645 </dt> | |
| 1646 <dd>The visit ID of the referrer.</dd> | |
| 1647 <!-- OBJECT PROPERTIES --> | |
| 1648 <!-- OBJECT METHODS --> | |
| 1649 <!-- OBJECT EVENT FIELDS --> | |
| 1650 <!-- FUNCTION PARAMETERS --> | |
| 1651 </div> | |
| 1652 </div><div> | |
| 1653 <div> | |
| 1654 <dt> | |
| 1655 <var>transition</var> | |
| 1656 <em> | |
| 1657 <!-- TYPE --> | |
| 1658 <div style="display:inline"> | |
| 1659 ( | |
| 1660 <span class="enum">enumerated</span> | |
| 1661 <span id="typeTemplate"> | |
| 1662 <span> | |
| 1663 <span>string</span> | |
| 1664 <span>["link", "typed", "auto_bookmark", "auto_subframe"
, "manual_subframe", "generated", "start_page", "form_submit", "reload", "keywor
d", "keyword_generated"]</span> | |
| 1665 </span> | |
| 1666 </span> | |
| 1667 ) | |
| 1668 </div> | |
| 1669 </em> | |
| 1670 </dt> | |
| 1671 <dd>The <a href="#transition_types">transition type</a> for this visit
from its referrer.</dd> | |
| 1672 <!-- OBJECT PROPERTIES --> | |
| 1673 <!-- OBJECT METHODS --> | |
| 1674 <!-- OBJECT EVENT FIELDS --> | |
| 1675 <!-- FUNCTION PARAMETERS --> | |
| 1676 </div> | |
| 1677 </div> | |
| 1678 </dl> | |
| 1679 </dd> | |
| 1680 <!-- OBJECT METHODS --> | |
| 1681 <!-- OBJECT EVENT FIELDS --> | |
| 1682 <!-- FUNCTION PARAMETERS --> | |
| 1683 </div> | |
| 1684 </div> <!-- /apiItem --> | |
| 1685 </div> <!-- /apiGroup --> | |
| 1686 </div> <!-- /apiPage --> | |
| 1687 </div> <!-- /gc-pagecontent --> | |
| 1688 </div> <!-- /g-section --> | |
| 1689 </div> <!-- /codesiteContent --> | |
| 1690 <div id="gc-footer" --=""> | |
| 1691 <div class="text"> | |
| 1692 <p> | |
| 1693 Except as otherwise <a href="http://code.google.com/policies.html#restrictions
">noted</a>, | |
| 1694 the content of this page is licensed under the <a rel="license" href="http://c
reativecommons.org/licenses/by/3.0/">Creative Commons | |
| 1695 Attribution 3.0 License</a>, and code samples are licensed under the | |
| 1696 <a rel="license" href="http://code.google.com/google_bsd_license.html">BSD Lic
ense</a>. | |
| 1697 </p> | |
| 1698 <p> | |
| 1699 ©2011 Google | |
| 1700 </p> | |
| 1701 <!-- begin analytics --> | |
| 1702 <script src="https://www.google-analytics.com/urchin.js" type="text/javascript">
</script> | |
| 1703 <script src="https://www.google-analytics.com/ga.js" type="text/javascript"></sc
ript> | |
| 1704 <script type="text/javascript"> | |
| 1705 // chrome doc tracking | |
| 1706 try { | |
| 1707 var engdocs = _gat._getTracker("YT-10763712-2"); | |
| 1708 engdocs._trackPageview(); | |
| 1709 } catch(err) {} | |
| 1710 // code.google.com site-wide tracking | |
| 1711 try { | |
| 1712 _uacct="UA-18071-1"; | |
| 1713 _uanchor=1; | |
| 1714 _uff=0; | |
| 1715 urchinTracker(); | |
| 1716 } | |
| 1717 catch(e) {/* urchinTracker not available. */} | |
| 1718 </script> | |
| 1719 <!-- end analytics --> | |
| 1720 </div> | |
| 1721 </div> <!-- /gc-footer --> | |
| 1722 </div> <!-- /gc-container --> | |
| 1723 </body></html> | |
| OLD | NEW |