HTML5 Notifications

Call requestNotifyPermission at the DOM load of your particular page and then because you have to ask the users permission to send them notifications.  It will looks something similar to this (this is from Google Calendar)

stick notify('Message') wherever you want to display a HTML5 notification

function requestNotifyPermission() {
	if (Notification.permission !== "denied") {
		Notification.requestPermission().then(function(permission) {
			console.log(`Notification permission is ${permission}`);
		});
	}
}

function notify(textToDisplay) {
	var options = {
	body: textToDisplay,
	lang: "",
	dir: "auto"
	};
	var notification = new Notification('Notey', options);
}