mirror of
https://github.com/electron/electron.git
synced 2026-01-24 23:08:10 -05:00
14 lines
310 B
JavaScript
14 lines
310 B
JavaScript
const {EventEmitter} = require('events')
|
|
const {Tray} = process.atomBinding('tray')
|
|
|
|
Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype)
|
|
|
|
Tray.prototype.setContextMenu = function (menu) {
|
|
this._setContextMenu(menu)
|
|
|
|
// Keep a strong reference of menu.
|
|
this.menu = menu
|
|
}
|
|
|
|
module.exports = Tray
|