Create web notification with timeout
Did you try Notification.close() ?
function spawnNotification(theBody,theIcon,theTitle) { var options = { body: theBody, icon: theIcon } var n = new Notification(theTitle,options); setTimeout(n.close.bind(n), 4000);}
source: https://developer.mozilla.org/en-US/docs/Web/API/Notification/close