Reputation: 5522
I'm trying to ask the user for permission again after he has denied permissions the first time. So if he click on my button enable notifications, after he has denied them the first time the browser should ask him again. According to this answer:
Notification popup doesn't appear in chrome
It's not possible, but I don't know if this has changed since 2014.
if (window.Notification || Notification.permission === 'denied') {
Notification.requestPermission(status => {
// do something
});
}
Upvotes: 3
Views: 5190
Reputation: 13755
When Notification.permission
value is denied
it is by design that the Notification.requestPermission
pop-up does NOT show up. The pop-up shows up only when the permission value is default
. If the value is denied, it needs to be reset in browser's settings, e.g. chrome://settings/content/notifications
Upvotes: 2