I've verified that Notification.permission === 'granted'
, and, 'Notification' in window == true
, altho the following Javascript does not make a notification appear in my Chrome browser, Version 70.0.3538.77 (Official Build) (64-bit).
var notif = new Notification('title', {
icon: 'https://placehold.it/120x120',
body: 'body'
});
I've executed the above in Chrome Console on the site that I know I've previously Allowed for Desktop Notifications. I've also verified that it's set to Allow in this location:
Had same issue recently. Solution for me was disabling "Enable native notifications" in chrome://flags . And the reason why I wasnt able to see notifications is because browser wanted to show native notification, and I disabled all windows notifications. Hope it will help someone in future :)
Okay, I'm writing just in case anyone finds it useful.
I encountered this problem as well and I tried different sites without success. However, @Don Reptile answer gave me a hint as to what may be wrong (I blocked native notifications).
I'm on Windows 10 and this was where I enabled native notifications from Chrome.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With