I use notification API to show popup window on Chrome 73:
new Notification('', {
icon: "images/transparent.png",
image: res,
requireInteraction: true
});
notification.onclose = function () {
alert('close')
};
notification.onclick= function () {
alert('click')
};
notification.onerror= function () {
alert('error');
};
notification.onnotificationclose = function () {
alert("close")
};
I see this popup:
but the problem is that if user clicks icon with arrow, then onclose is fired, but if user clicks 'Close' aka 'Закрыть' button, no handler is invoked. How can I handle it? Is it a bug in chrome?
from Chrome notification click on Close button

No comments:
Post a Comment