DEV Community

Discussion on: How to send Chrome / Browser Notifications

Collapse
 
iamandrewluca profile image
Andrei Luca • Edited

developer.mozilla.org/en-US/docs/W...

The latest spec has updated this method to a promise-based syntax that works like this:

Notification.requestPermission().then(function(permission) { ... });

Previously, the syntax was based on a simple callback; this version is now deprecated:

Notification.requestPermission(callback);

ps: an advice to make reading more interactive is to add links to different api and resources!