Previous Article
Ajax dropdown using PHP, MySQL and jQuery
11 February 2018
Initialize the Browser Notification
For more comfortable to use we need to take user permission to display web notification.
document.addEventListener('DOMContentLoaded', function () {
if (Notification.permission !== "granted")
{
Notification.requestPermission();
}
});
if(window.Notification && Notification.permission !== "denied") {
Notification.requestPermission(function(status) { // status is "granted", if accepted by user
var n = new Notification('Title', {
body: 'I am the body text!',
icon: '/path/to/icon.png' // optional
});
});
}
Please share and Subscribe to get latest updates and tutorials form Being Idea
We ship software that scales. Let's work together.