mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Merge pull request #9269 from electron/main-notifications
Notifications from the main process
This commit is contained in:
@@ -11,6 +11,7 @@ module.exports = [
|
||||
{name: 'Menu', file: 'menu'},
|
||||
{name: 'MenuItem', file: 'menu-item'},
|
||||
{name: 'net', file: 'net'},
|
||||
{name: 'Notification', file: 'notification'},
|
||||
{name: 'powerMonitor', file: 'power-monitor'},
|
||||
{name: 'powerSaveBlocker', file: 'power-save-blocker'},
|
||||
{name: 'protocol', file: 'protocol'},
|
||||
|
||||
8
lib/browser/api/notification.js
Normal file
8
lib/browser/api/notification.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const {EventEmitter} = require('events')
|
||||
const {Notification, isSupported} = process.atomBinding('notification')
|
||||
|
||||
Object.setPrototypeOf(Notification.prototype, EventEmitter.prototype)
|
||||
|
||||
Notification.isSupported = isSupported
|
||||
|
||||
module.exports = Notification
|
||||
Reference in New Issue
Block a user