electron-native-notification
Easily display native desktop applications from your Electron main process.
Because Notifications use the HTML 5 Notification API, this usually only works from renderer processes.
However, it's a polyfill from https://developer.mozilla.org/en-US/docs/Web/API/notification.
Usage
Reference https://developer.mozilla.org/en-US/docs/Web/API/notification.
main.js:
const app = Notification = ; app;
Polyfill what?
Constructor
- Notification(title, options)
Properties
- body (Read-only)
- data (Read-only)
- dir (Read-only)
- icon (Read-only)
- lang (Read-only)
- onclick
- onerror
- tag (Read-only)
- timestamp (Read-only)
- title (Read-only)
Methods
- close()
- on() (Event register for node)
- addListener() (Event register for node)
- addEventListener() (Event register for javascript)
Events
- error
- click
- close
- show
License
MIT