Closed sashuk closed 4 years ago
The routine that asks for permissions is expecting the requestPermission() to accept callback. However, according to the documentation at https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission the newer standard is returning the Promise.
requestPermission()
window.Notification.requestPermission(function (permission) { var result = permission === PERMISSION_GRANTED; ... });
Thanks a lot for the library!
I published v0.8.0 on NPM https://www.npmjs.com/package/react-web-notification
The routine that asks for permissions is expecting the
requestPermission()
to accept callback. However, according to the documentation at https://developer.mozilla.org/en-US/docs/Web/API/Notification/requestPermission the newer standard is returning the Promise.Thanks a lot for the library!