Merge pull request #9269 from electron/main-notifications

Notifications from the main process
This commit is contained in:
Cheng Zhao 2017-05-31 17:21:05 +09:00 committed by GitHub
commit e82af41591
22 changed files with 438 additions and 25 deletions

View file

@ -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'},

View 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