0
I used javascript below to display notifications. It works and is called 10 in 10 seconds. However, when two notification windows happen to appear, only one is automatically closed. Is it possible for me to close it after a while or is it always the user who has to close it manually? Thank you.
function notify(mensagem) {
Notification.requestPermission(function() {
var notification = new Notification("Vai aparecer notificação!", {
icon: 'favicon.ico',
icon: 'logo.png',
body: mensagem
});
notification.onclick = function() {
window.open("http://www.site.com");
}
});
}