mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Remove "async" option from menu.popup()
All menus are async now. See "Cleanup MenuRunner API" https://codereview.chromium.org/2790773002
This commit is contained in:
committed by
Cheng Zhao
parent
338604239d
commit
4e859b4718
@@ -44,7 +44,6 @@ Menu.prototype._init = function () {
|
||||
}
|
||||
|
||||
Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
let asyncPopup
|
||||
let [newX, newY, newPosition, newWindow] = [x, y, positioningItem, window]
|
||||
|
||||
// menu.popup(x, y, positioningItem)
|
||||
@@ -61,7 +60,6 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
newX = opts.x
|
||||
newY = opts.y
|
||||
newPosition = opts.positioningItem
|
||||
asyncPopup = opts.async
|
||||
}
|
||||
|
||||
// set defaults
|
||||
@@ -69,9 +67,8 @@ Menu.prototype.popup = function (window, x, y, positioningItem) {
|
||||
if (typeof y !== 'number') newY = -1
|
||||
if (typeof positioningItem !== 'number') newPosition = -1
|
||||
if (!window) newWindow = BrowserWindow.getFocusedWindow()
|
||||
if (typeof asyncPopup !== 'boolean') asyncPopup = false
|
||||
|
||||
this.popupAt(newWindow, newX, newY, newPosition, asyncPopup)
|
||||
this.popupAt(newWindow, newX, newY, newPosition)
|
||||
}
|
||||
|
||||
Menu.prototype.closePopup = function (window) {
|
||||
|
||||
Reference in New Issue
Block a user