HTML5 Web notifications
Modern browser’s Notifications API lets a web page or app send notifications that are displayed outside the page at the system level, just like a native app! This works even if the application is idle or in the background.
This page help you test your browser’s support for HTML5 Notification.
We would first need user’s permission to show notification.
// request permission
Notification.requestPermission().then((result) => {
console.log(result);
});
// then we publish the notification like
new Notification(`This is a web notification!.`, {
tag: "bowserNotification",
});
Here is something to try out -