JavaScript Notification API for beginners

Just two steps:

  1. Ask user the permission to send notifications

Notification.requestPermission();

2. Create/send notifiation

notificaiton = new Notification (‘This is a notification’);     

Leave a Reply