Make Menu.popup accept no parameter
This commit is contained in:
parent
e5e4749eb3
commit
0fb68e8130
2 changed files with 7 additions and 3 deletions
|
@ -79,7 +79,11 @@ Menu::_init = ->
|
|||
v8Util.setHiddenValue group[0], 'checked', true unless checked
|
||||
|
||||
Menu::popup = (window, x, y) ->
|
||||
throw new TypeError('Invalid window') unless window?.constructor is BrowserWindow
|
||||
unless window?.constructor is BrowserWindow
|
||||
# Shift.
|
||||
y = x
|
||||
x = window
|
||||
window = BrowserWindow.getFocusedWindow()
|
||||
if x? and y?
|
||||
@_popupAt(window, x, y)
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue