Π·Π΅ΡΠΊΠ°Π»ΠΎ ΠΈΠ· https://github.com/electron/electron.git
This commit is contained in:
Π ΠΎΠ΄ΠΈΡΠ΅Π»Ρ
58c1d38c96
ΠΠΎΠΌΠΌΠΈΡ
ece319a687
|
@ -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
|
||||
|
|
ΠΠ°Π³ΡΡΠ·ΠΊΠ°β¦
Π‘ΡΡΠ»ΠΊΠ° Π² Π½ΠΎΠ²ΠΎΠΉ Π·Π°Π΄Π°ΡΠ΅