Experimental App APIs
For information on how to use experimental APIs, see the chrome.experimental.* APIs page.
Experimental App APIs
The current methods allow applications to generate passive notifications.
API reference: chrome.experimental.app
Properties
getLastError
chrome.extensionlastError
Methods
clearAllNotifications
void
chrome.experimental.app.clearAllNotifications(, function
callback)
Undocumented.
Clears all previously sent notifications.
Parameters
-
callback
(
optional
enumerated
Type
array of
function
)
-
Undocumented.
- A callback when the function is complete. Any errors will be reported in chrome.extension.lastError.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
Returns
Callback function
The callback parameter should specify a function
that looks like this:
If you specify the callback parameter, it should
specify a function that looks like this:
function(null) {...};
This function was added in version .
If you require this function, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
notify
void
chrome.experimental.app.notify(, object
details, function
callback)
Undocumented.
Creates a notification from this app.
Parameters
-
details
(
optional
enumerated
Type
array of
object
)
-
Undocumented.
-
Description of this parameter from the json schema.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
passive
(
optional
enumerated
Type
array of
boolean
)
-
Undocumented.
- Whether the notification should be passive (true) or active (false). The default value is true.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
title
(
optional
enumerated
Type
array of
string
)
-
Undocumented.
- The title of the notification.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
bodyText
(
optional
enumerated
Type
array of
string
)
-
Undocumented.
- The text content of the notification.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
linkUrl
(
optional
enumerated
Type
array of
string
)
-
Undocumented.
- The URL for an optional link to show along with the notification. If you specify a linkUrl, you must also specify a value for linkText.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
linkText
(
optional
enumerated
Type
array of
string
)
-
Undocumented.
- If a linkUrl is provided, this is required and will be used as the linkified text. It should be relatively short.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
iconData
(
optional
enumerated
Type
array of
ImageData
)
-
Undocumented.
- Pixel data for an image to use as the icon for this notification. Must be an ImageData object (for example, from a canvas element).
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
-
-
-
callback
(
optional
enumerated
Type
array of
function
)
-
Undocumented.
- A callback when the function is complete. Any errors will be reported in chrome.extension.lastError.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
Returns
Callback function
The callback parameter should specify a function
that looks like this:
If you specify the callback parameter, it should
specify a function that looks like this:
function() {...};
This function was added in version .
If you require this function, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
resetLaunchIcon
void
chrome.experimental.app.resetLaunchIcon(, function
callback)
Undocumented.
Resets the app's launch icon to its default value as specified in the manifest.json file.
Parameters
-
callback
(
optional
enumerated
Type
array of
function
)
-
Undocumented.
- A callback when the function is complete. Any errors will be reported in chrome.extension.lastError.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
Returns
Callback function
The callback parameter should specify a function
that looks like this:
If you specify the callback parameter, it should
specify a function that looks like this:
function(null) {...};
This function was added in version .
If you require this function, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
setLaunchIcon
void
chrome.experimental.app.setLaunchIcon(, ImageData
iconData, function
callback)
Undocumented.
A description from the json schema def of the function goes here.
Parameters
-
iconData
(
optional
enumerated
Type
array of
ImageData
)
-
Undocumented.
- Pixel data for an image to replace the launch icon on the New Tab Page. Must be an ImageData object (for example, from a canvas element). See http://code.google.com/chrome/webstore/docs/images.html for more details.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
-
callback
(
optional
enumerated
Type
array of
function
)
-
Undocumented.
- A callback when the function is complete. Any errors will be reported in chrome.extension.lastError.
-
This parameter was added in version
.
You must omit this parameter in earlier versions,
and you may omit it in any version. If you require this
parameter, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
-
-
-
-
Returns
Callback function
The callback parameter should specify a function
that looks like this:
If you specify the callback parameter, it should
specify a function that looks like this:
function(null) {...};
This function was added in version .
If you require this function, the manifest key
minimum_chrome_version
can ensure that your extension won't be run in an earlier browser version.
Events
event name
chrome.bookmarksonEvent.addListener(function(Type param1, Type param2) {...}, Type opt_param1, Type opt_param2));
Undocumented.
A description from the json schema def of the event goes here.
Extra parameters to addListener
Listener returns