🎨
This commit is contained in:
parent
58c1d38c96
commit
ece319a687
1 changed files with 14 additions and 14 deletions
|
@ -125,21 +125,21 @@ exports.execute = function (role, focusedWindow) {
|
|||
return true
|
||||
}
|
||||
|
||||
if (focusedWindow != null) {
|
||||
if (windowMethod) {
|
||||
if (typeof windowMethod === 'function') {
|
||||
windowMethod(focusedWindow)
|
||||
} else {
|
||||
focusedWindow[windowMethod]()
|
||||
}
|
||||
return true
|
||||
} else if (webContentsMethod) {
|
||||
const {webContents} = focusedWindow
|
||||
if (webContents) {
|
||||
webContents[webContentsMethod]()
|
||||
}
|
||||
return true
|
||||
if (windowMethod && focusedWindow != null) {
|
||||
if (typeof windowMethod === 'function') {
|
||||
windowMethod(focusedWindow)
|
||||
} else {
|
||||
focusedWindow[windowMethod]()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
if (webContentsMethod && focusedWindow != null) {
|
||||
const {webContents} = focusedWindow
|
||||
if (webContents) {
|
||||
webContents[webContentsMethod]()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue