notifications.update()

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 into notifications.create()'s callback.
options
notifications.NotificationOptions. Defines the notification's new content and behavior.
callbackOptional
function. The function is passed the following arguments:
wasUpdated
boolean. true if the notification was updated, or false if it was not (for example, because the notification referenced by id did not exist).,

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?NoYes331
Firefox
Basic supportNo

1. In Opera update() does not work on Macs.

Examples

Acknowledgements

This API is based on Chromium's chrome.notifications API.

Document Tags and Contributors

 Contributors to this page: wbamberg
 Last updated by: wbamberg,