Closed Bug 1286536 Opened 4 years ago Closed 4 years ago
Add support for buttons to ns
For parity with the Chrome notifications API , our notifications API should support creating alerts with buttons. Chrome allows up to 2 buttons to be included in the alert, with each button having a title and icon . When a button is clicked an event should be dispatched which the API can listen for. As per chrome.notifications.onButtonClicked , the event should include the notificationId and the buttonIndex.  https://developer.chrome.com/extensions/notifications  https://developer.chrome.com/extensions/notifications#type-NotificationOptions  https://developer.chrome.com/extensions/notifications#event-onButtonClicked
Thanks, Bob! The web notifications API calls these "actions," so I'll close this as a dupe of that bug. Implementing them in `nsIAlertsService` will make them available to all callers. On OS X, we might place the actions in a drop-down, to make room for our own actions ("disable notifications" and "open notification settings"). We'll probably only do that for web notifications, though; web extensions and chrome JS callers could make use of both buttons.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1225110
You need to log in before you can comment on or make changes to this bug.