Desktop Notification not appearing in Chrome
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.
Issue of not opening dialog box is http. Chrome desktop notification work only on https protocol.
I have faced this issue and I have spend many time to solved that. Finally I got solution using https.
Here I shared code so you can run on https and it will working fine.
// request permission on page loaddocument.addEventListener('DOMContentLoaded', function() { if (!Notification) { alert('Desktop notifications not available in your browser. Try Chromium.'); return; } if (Notification.permission !== "granted") Notification.requestPermission();});function notifyMe() { if (Notification.permission !== "granted") Notification.requestPermission(); else { var notification = new Notification('Notification title', { icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png', body: "Hey there! You've been notified!", }); notification.onclick = function() { window.open("http://stackoverflow.com/a/13328397/1269037"); }; }}notifyMe();
Call notifyMe();
to show notification