Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2009 Google
Google Chrome provides APIs such as
chrome.bookmarks
and chrome.tab
so that extensions can interact with the browser.
Here are the supported chrome.* APIs:
We'd like your feedback on the following experimental APIs:
Caution: Don't depend on these experimental APIs. They might disappear, and they will change. Also, the extension gallery doesn't allow you to upload extensions that use experimental APIs.
To use an experimental API, you must specify the "experimental" permission in your extension's manifest, like this:
"permissions": [ "experimental", ... ],
You must also specify the --enable-experimental-extension-apis flag when you launch the browser. On Windows, you can do this by modifying the properties of the shortcut that you use to launch Google Chrome. For example:
path_to_chrome.exe --enable-experimental-extension-apis
Unless the doc says otherwise, methods in the chrome.* APIs are asynchronous: they return immediately, without waiting for the operation to finish. If you need to know the outcome of an operation, then you pass a callback function into the method. For more information, see the video Extension API Design.