Y
Hacker News
new
|
ask
|
show
|
jobs
by
LoSboccacc
2963 days ago
That’s because the api is badly defined, the javascript call to ask for notification is syncronous so the browser need that annoying blocking popup insteas of something less invasive like the popup notification
1 comments
Klathmon
2963 days ago
The javascript call to request notification permissions is async (returning a promise in newer browsers, callback in older ones).
https://developer.mozilla.org/en-US/docs/Web/API/Notificatio...
link
https://developer.mozilla.org/en-US/docs/Web/API/Notificatio...