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