JavaScript Notifications API

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • Notification.requestPermission(callback)
  • Notification.requestPermission().then(callback, rejectFunc)
  • new Notification(title, options)
  • notification.close()

Remarks

The Notifications API was designed to allow browser access to notifying the client.

Support by browsers might be limited. Also support by the operating system may be limited.

The following table gives an overview of the earliest browser versions that provide support for notifications.

ChromeEdgeFirefoxInternet ExplorerOperaOpera MiniSafari
291446no support38no support9.1


Got any JavaScript Question?