mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
14 lines
327 B
CoffeeScript
14 lines
327 B
CoffeeScript
{EventEmitter} = require 'events'
|
|
{Tray} = process.atomBinding 'tray'
|
|
|
|
Tray::__proto__ = EventEmitter.prototype
|
|
|
|
Tray::setContextMenu = (menu) ->
|
|
@_setContextMenu menu
|
|
@menu = menu # Keep a strong reference of menu.
|
|
|
|
# Keep compatibility with old APIs.
|
|
Tray::popContextMenu = Tray::popUpContextMenu
|
|
|
|
module.exports = Tray
|