0
Good evening, I’m running a code to present 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 coming! What might be going on?
Permission is already positive
*****edited****
the code q asks for permission is this: alias, not working in 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!')
}
})
})
}
}
yes Ucas, I have a method that is doing this... I will edit the question to show!!
– Adriel Werlich