UNPKG

electron-main-notification

Version:
24 lines (21 loc) 506 B
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <script type="text/javascript"> const { ipcRenderer } = require('electron') ipcRenderer.on('display-notification', (event, arg) => { var notification = new Notification (arg.title, arg.opts) notification.onclick = () => { ipcRenderer.send('display-notification-onclick', arg.uid) } notification.onclose = () => { ipcRenderer.send('display-notification-onclose', arg.uid) } }) </script> </body> </html>