Open notification links when notifications are clicked on Firefox and Opera
We occasionally display desktop notifications to our users. The notifications can contain links, if the browser supports notification buttons we turn those links into buttons for the user to click on. Some browsers don't support notification buttons however.
There are two ways we display the desktop notifications, for most browsers we use browser.notifications.create since it is more powerful and sometimes supports buttons, but for Edge we use Notification since using the
browser.notifications.create API actually crashes the entire browser!
When we create a notification with links for Edge using
Notification we make it so that when the notification is clicked, the notification links are all opened for the user at the time the notification is dismissed. However, when we create notifications using
browser.notifications.create for browsers which don't support buttons (Firefox and Opera), we don't provide any way for the user to open the notification links!
What to change
When creating a notification using
browser.notifications.create, if buttons are not supported ensure that all the notification links are opened when the notification is clicked.