Gets the set of all current notifications created by the add-on.


  function(notifications) {...}

This API is also available as browser.notifications.getAll() in a version that returns a promise.


function. The function is passed the following arguments:
object or array. In Firefox this is an array of strings, each of which is the ID of a currently active notification. In Chrome it is an object with one property for each active notification, whose name is the ID of that notification and whose value is true.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 45.0 48.0 33


This example shows a notification when the user clicks a browser action, unless the notification was already being shown, in which case it clears the notification. It uses getAll() to figure out whether the notification is being shown:

var myNotification = "my-notification";

chrome.browserAction.onClicked.addListener(function () {
  chrome.notifications.getAll((all) => {
    if (myNotification in all) {
    } else {
      chrome.notifications.create(myNotification, {
        "type": "basic",
        "iconUrl": chrome.extension.getURL("icons/cake-48.png"),
        "title": "Am imposing title",
        "message": "Some interesting content"


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

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

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