Fired when the user clicks one of the notification's buttons.
browser.notifications.onButtonClicked.addListener(listener) browser.notifications.onButtonClicked.removeListener(listener) browser.notifications.onButtonClicked.hasListener(listener)
Events have three functions:
- Adds a listener to this event.
- Stop listening to this event. The
listenerargument is the listener to remove.
- Check whether
listeneris registered for this event. Returns
trueif it is listening,
Function that will be called when this event occurs. The function will be passed the following arguments:
string. ID of the notification whose button was clicked.
integer. The zero-based index of the button that was clicked.
BCD tables only load in the browser
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
This API is based on Chromium's
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.