| OLD | NEW |
| 1 <!DOCTYPE html><!-- This page is a placeholder for generated extensions api doc.
Note: | 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 | 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 | 3 across api docs and should be edited only with knowledge of the |
| 4 templating mechanism. | 4 templating mechanism. |
| 5 3) All <body>.innerHTML is genereated as an rendering step. If viewed in a | 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 | 6 browser, it will be re-generated from the template, json schema and |
| 7 authored overview content. | 7 authored overview content. |
| 8 4) The <body>.innerHTML is also generated by an offline step so that this | 8 4) The <body>.innerHTML is also generated by an offline step so that this |
| 9 page may easily be indexed by search engines. | 9 page may easily be indexed by search engines. |
| 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> | 10 --><html xmlns="http://www.w3.org/1999/xhtml"><head> |
| 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | 11 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> | 12 <link href="css/ApiRefStyles.css" rel="stylesheet" type="text/css"> |
| 13 <link href="css/print.css" rel="stylesheet" type="text/css" media="print"> | 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"> | 14 <script type="text/javascript" src="../../../third_party/jstemplate/jstempla
te_compiled.js"> |
| 15 </script> | 15 </script> |
| 16 <script type="text/javascript" src="js/api_page_generator.js"></script> | 16 <script type="text/javascript" src="js/api_page_generator.js"></script> |
| 17 <script type="text/javascript" src="js/bootstrap.js"></script> | 17 <script type="text/javascript" src="js/bootstrap.js"></script> |
| 18 <script type="text/javascript" src="js/sidebar.js"></script> | 18 <script type="text/javascript" src="js/sidebar.js"></script> |
| 19 <title>chrome.experimental.savePage - Google Chrome Extensions - Google Code</
title></head> | 19 <title>chrome.pageCapture - Google Chrome Extensions - Google Code</title></he
ad> |
| 20 <body> <div id="gc-container" class="labs"> | 20 <body> <div id="gc-container" class="labs"> |
| 21 <div id="devModeWarning"> | 21 <div id="devModeWarning"> |
| 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. | 22 You are viewing extension docs in chrome via the 'file:' scheme: are you
expecting to see local changes when you refresh? You'll need run chrome with --
allow-file-access-from-files. |
| 23 </div> | 23 </div> |
| 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> | 24 <!-- SUBTEMPLATES: DO NOT MOVE FROM THIS LOCATION --> |
| 25 <!-- In particular, sub-templates that recurse, must be used by allowing | 25 <!-- In particular, sub-templates that recurse, must be used by allowing |
| 26 jstemplate to make a copy of the template in this section which | 26 jstemplate to make a copy of the template in this section which |
| 27 are not operated on by way of the jsskip="true" --> | 27 are not operated on by way of the jsskip="true" --> |
| 28 <div style="display:none"> | 28 <div style="display:none"> |
| 29 | 29 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 </ul> | 287 </ul> |
| 288 </li> | 288 </li> |
| 289 </ul> | 289 </ul> |
| 290 </div> | 290 </div> |
| 291 <script> | 291 <script> |
| 292 initToggles(); | 292 initToggles(); |
| 293 </script> | 293 </script> |
| 294 | 294 |
| 295 <div class="g-unit" id="gc-pagecontent"> | 295 <div class="g-unit" id="gc-pagecontent"> |
| 296 <div id="pageTitle"> | 296 <div id="pageTitle"> |
| 297 <h1 class="page_title">chrome.experimental.savePage</h1> | 297 <h1 class="page_title">chrome.pageCapture</h1> |
| 298 </div> | 298 </div> |
| 299 <!-- TABLE OF CONTENTS --> | 299 <!-- TABLE OF CONTENTS --> |
| 300 <div id="toc"> | 300 <div id="toc"> |
| 301 <h2>Contents</h2> | 301 <h2>Contents</h2> |
| 302 <ol> | 302 <ol> |
| 303 <li> | 303 <li> |
| 304 <a href="#manifest">Manifest</a> | 304 <a href="#manifest">Manifest</a> |
| 305 <ol> | 305 <ol> |
| 306 <li style="display: none; "> | 306 <li style="display: none; "> |
| 307 <a>h3Name</a> | 307 <a>h3Name</a> |
| 308 </li> | 308 </li> |
| 309 </ol> | 309 </ol> |
| 310 </li> | 310 </li> |
| 311 <li> | 311 <li> |
| 312 <a href="#apiReference">API reference: chrome.experimental.saveP
age</a> | 312 <a href="#apiReference">API reference: chrome.pageCapture</a> |
| 313 <ol> | 313 <ol> |
| 314 <li style="display: none; "> | 314 <li style="display: none; "> |
| 315 <a href="#properties">Properties</a> | 315 <a href="#properties">Properties</a> |
| 316 <ol> | 316 <ol> |
| 317 <li> | 317 <li> |
| 318 <a href="#property-anchor">propertyName</a> | 318 <a href="#property-anchor">propertyName</a> |
| 319 </li> | 319 </li> |
| 320 </ol> | 320 </ol> |
| 321 </li> | 321 </li> |
| 322 <li> | 322 <li> |
| 323 <a href="#global-methods">Methods</a> | 323 <a href="#global-methods">Methods</a> |
| 324 <ol> | 324 <ol> |
| 325 <li> | 325 <li> |
| 326 <a href="#method-saveAsMHTML">saveAsMHTML</a> | 326 <a href="#method-saveAsMhtml">saveAsMhtml</a> |
| 327 </li> | 327 </li> |
| 328 </ol> | 328 </ol> |
| 329 </li> | 329 </li> |
| 330 <li style="display: none; "> | 330 <li style="display: none; "> |
| 331 <a>Events</a> | 331 <a>Events</a> |
| 332 <ol> | 332 <ol> |
| 333 <li> | 333 <li> |
| 334 <a href="#event-anchor">eventName</a> | 334 <a href="#event-anchor">eventName</a> |
| 335 </li> | 335 </li> |
| 336 </ol> | 336 </ol> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 347 </li> | 347 </li> |
| 348 </ol> | 348 </ol> |
| 349 </li> | 349 </li> |
| 350 </ol> | 350 </ol> |
| 351 </li> | 351 </li> |
| 352 </ol> | 352 </ol> |
| 353 </div> | 353 </div> |
| 354 <!-- /TABLE OF CONTENTS --> | 354 <!-- /TABLE OF CONTENTS --> |
| 355 | 355 |
| 356 <!-- Standard content lead-in for experimental API pages --> | 356 <!-- Standard content lead-in for experimental API pages --> |
| 357 <p id="classSummary"> | 357 <p id="classSummary" style="display: none; "> |
| 358 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. | 358 For information on how to use experimental APIs, see the <a href="expe
rimental.html">chrome.experimental.* APIs</a> page. |
| 359 </p> | 359 </p> |
| 360 | 360 |
| 361 <!-- STATIC CONTENT PLACEHOLDER --> | 361 <!-- STATIC CONTENT PLACEHOLDER --> |
| 362 <div id="static"><!-- BEGIN AUTHORED CONTENT --> | 362 <div id="static"><!-- BEGIN AUTHORED CONTENT --> |
| 363 <p> | 363 <p> |
| 364 The savePage API allows you to save a tab as MHTML. | 364 The pageCapture API allows you to save a tab as MHTML. |
| 365 </p> | 365 </p> |
| 366 | 366 |
| 367 <p> | 367 <p> |
| 368 MHTML is a <a href="http://tools.ietf.org/html/rfc2557">standard format</a> | 368 MHTML is a <a href="http://tools.ietf.org/html/rfc2557">standard format</a> |
| 369 supported by most browsers. It encapsulates in a single file a page and all | 369 supported by most browsers. It encapsulates in a single file a page and all |
| 370 its resources (CSS files, images..). | 370 its resources (CSS files, images..). |
| 371 </p> | 371 </p> |
| 372 | 372 |
| 373 <p> | 373 <p> |
| 374 Note that for security reasons a MHTML file can only be loaded from the file | 374 Note that for security reasons a MHTML file can only be loaded from the file |
| 375 system and that it can only be loaded in the main frame. | 375 system and that it can only be loaded in the main frame. |
| 376 </p> | 376 </p> |
| 377 | 377 |
| 378 <h2 id="manifest">Manifest</h2> | 378 <h2 id="manifest">Manifest</h2> |
| 379 | 379 |
| 380 <p> | 380 |
| 381 The savePage API is currently | 381 <p>You must declare the "pageCapture" permission |
| 382 experimental, so you must declare the "experimental" | 382 in the <a href="manifest.html">extension manifest</a> |
| 383 permission to use it. | 383 to use the history API. |
| 384 For example:</p> |
| 385 <pre>{ |
| 386 "name": "My extension", |
| 387 ... |
| 388 <b>"permissions": [ |
| 389 "pageCapture" |
| 390 ]</b>, |
| 391 ... |
| 392 }</pre> |
| 384 | 393 |
| 385 <!-- END AUTHORED CONTENT --> | 394 <!-- END AUTHORED CONTENT --> |
| 386 </p></div> | 395 </div> |
| 387 | 396 |
| 388 <!-- API PAGE --> | 397 <!-- API PAGE --> |
| 389 <div class="apiPage"> | 398 <div class="apiPage"> |
| 390 <a name="apiReference"></a> | 399 <a name="apiReference"></a> |
| 391 <h2>API reference: chrome.experimental.savePage</h2> | 400 <h2>API reference: chrome.pageCapture</h2> |
| 392 | 401 |
| 393 <!-- PROPERTIES --> | 402 <!-- PROPERTIES --> |
| 394 <div class="apiGroup" style="display: none; "> | 403 <div class="apiGroup" style="display: none; "> |
| 395 <a name="properties"></a> | 404 <a name="properties"></a> |
| 396 <h3 id="properties">Properties</h3> | 405 <h3 id="properties">Properties</h3> |
| 397 | 406 |
| 398 <div> | 407 <div> |
| 399 <a></a> | 408 <a></a> |
| 400 <h4>getLastError</h4> | 409 <h4>getLastError</h4> |
| 401 <div class="summary"> | 410 <div class="summary"> |
| 402 <!-- Note: intentionally longer 80 columns --> | 411 <!-- Note: intentionally longer 80 columns --> |
| 403 <span>chrome.extension</span><span>lastError</span> | 412 <span>chrome.extension</span><span>lastError</span> |
| 404 </div> | 413 </div> |
| 405 <div> | 414 <div> |
| 406 </div> | 415 </div> |
| 407 </div> | 416 </div> |
| 408 | 417 |
| 409 </div> <!-- /apiGroup --> | 418 </div> <!-- /apiGroup --> |
| 410 | 419 |
| 411 <!-- METHODS --> | 420 <!-- METHODS --> |
| 412 <div id="methodsTemplate" class="apiGroup"> | 421 <div id="methodsTemplate" class="apiGroup"> |
| 413 <a name="global-methods"></a> | 422 <a name="global-methods"></a> |
| 414 <h3>Methods</h3> | 423 <h3>Methods</h3> |
| 415 | 424 |
| 416 <!-- iterates over all functions --> | 425 <!-- iterates over all functions --> |
| 417 <div class="apiItem"> | 426 <div class="apiItem"> |
| 418 <a name="method-saveAsMHTML"></a> <!-- method-anchor --> | 427 <a name="method-saveAsMhtml"></a> <!-- method-anchor --> |
| 419 <h4>saveAsMHTML</h4> | 428 <h4>saveAsMhtml</h4> |
| 420 | 429 |
| 421 <div class="summary"><span style="display: none; ">void</span> | 430 <div class="summary"><span style="display: none; ">void</span> |
| 422 <!-- Note: intentionally longer 80 columns --> | 431 <!-- Note: intentionally longer 80 columns --> |
| 423 <span>chrome.experimental.savePage.saveAsMHTML</span>(<span cl
ass="null"><span style="display: none; ">, </span><span>object</span> | 432 <span>chrome.pageCapture.saveAsMhtml</span>(<span class="null"
><span style="display: none; ">, </span><span>object</span> |
| 424 <var><span>details</span></var></span><span class="null"><
span>, </span><span>function</span> | 433 <var><span>details</span></var></span><span class="null"><
span>, </span><span>function</span> |
| 425 <var><span>callback</span></var></span>)</div> | 434 <var><span>callback</span></var></span>)</div> |
| 426 | 435 |
| 427 <div class="description"> | 436 <div class="description"> |
| 428 <p class="todo" style="display: none; ">Undocumented.</p> | 437 <p class="todo" style="display: none; ">Undocumented.</p> |
| 429 <p>Saves the content of the tab with given id as MHTML.</p> | 438 <p>Saves the content of the tab with given id as MHTML.</p> |
| 430 | 439 |
| 431 <!-- PARAMETERS --> | 440 <!-- PARAMETERS --> |
| 432 <h4>Parameters</h4> | 441 <h4>Parameters</h4> |
| 433 <dl> | 442 <dl> |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 _uff=0; | 864 _uff=0; |
| 856 urchinTracker(); | 865 urchinTracker(); |
| 857 } | 866 } |
| 858 catch(e) {/* urchinTracker not available. */} | 867 catch(e) {/* urchinTracker not available. */} |
| 859 </script> | 868 </script> |
| 860 <!-- end analytics --> | 869 <!-- end analytics --> |
| 861 </div> | 870 </div> |
| 862 </div> <!-- /gc-footer --> | 871 </div> <!-- /gc-footer --> |
| 863 </div> <!-- /gc-container --> | 872 </div> <!-- /gc-container --> |
| 864 </body></html> | 873 </body></html> |
| OLD | NEW |