Updates a notification, given its ID.
Syntax
browser.notifications.update( id, // string options, // NotificationOptions function(wasUpdated) {...} // optional function )
Parameters
id
string
. The ID of the notification to update. This is the same as the ID passed intonotifications.create()
's callback.options
notifications.NotificationOptions
. Defines the notification's new content and behavior.callback
Optionalfunction
. The function is passed the following arguments:-
wasUpdated
boolean
.true
if the notification was updated, orfalse
if it was not (for example, because the notification referenced byid
did not exist).,
Browser compatibility
1. In Opera update() does not work on Macs.
Examples
Acknowledgements
This API is based on Chromium's chrome.notifications
API.