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.
WARNING: This is the BETA documentation. It may not work with the stable release of Chrome.
WARNING: This is unofficial documentation. It may not work with the current release of Chrome.

Google Chrome Extensions (Labs)

chrome.pageCapture

The pageCapture API allows you to save a tab as MHTML.

MHTML is a standard format supported by most browsers. It encapsulates in a single file a page and all its resources (CSS files, images..).

Note that for security reasons a MHTML file can only be loaded from the file system and that it can only be loaded in the main frame.

Manifest

You must declare the "pageCapture" permission in the extension manifest to use the history API. For example:

{
  "name": "My extension",
  ...
  "permissions": [
    "pageCapture"
  ],
  ...
}

API reference: chrome.pageCapture

Methods

saveAsMHTML

chrome.pageCapture.saveAsMHTML(object details, function callback)

Saves the content of the tab with given id as MHTML.

Parameters

details
( object )
Undocumented.
tabId
( integer )
The id of the tab to save as MHTML.
callback
( function )
Called when the MHTML has been generated.

Callback function

The callback parameter should specify a function that looks like this:

function(blob mhtmlData) {...};
mhtmlData
( optional blob )
The MHTML data as a Blob.