Good evening, I'm running a code to submit a notification:
if(Notification.permission === 'granted' && !this._active) {
let n = new Notification(this._activeContact.name,{
icon : this._activeContact.photo,
body : data.content
});
But no notification is popping up! What could be happening?
Permission is already positive
***** edited ****
The code that asks for the permission is this: alias, is not working on the edge ...
checkNotifications(){
// debugger
if (typeof Notification === 'function'){
if (Notification.permission !== 'granted'){
this.el.alertNotificationPermission.show()
} else {
this.el.alertNotificationPermission.hide()
}
this.el.alertNotificationPermission.on('click', e=> {
Notification.requestPermission(permission => {
if (permission === 'granted') {
this.el.alertNotificationPermission.hide()
console.info('notificações permitidas!')
}
})
})
}
}