Notifications, available through the Notifications API, allow authorized web applications to draw users attention in a bold but standardized fashion. Notifications are generated by the web application running in a browsers' tab to be presented to the user outside of the browser tab area.
Sadly, due to Android limitations, Chrome - the only browser on Android that implemented the feature - removed support for this API in favor of persistent Service Worker-based notifications, leaving the API available but effectively doing nothing. See Push Notifications for more complex, but working alternative.
- Asks a user for the permission to show Notifications, calls
callbackwith the prompt result.
- Returns current permission state -
new Notification(title, [options])
- Displays local notification outside of the browser tab area.