зеркало из https://github.com/electron/electron.git
Execute command on devtools web contents when focused
This commit is contained in:
Родитель
fa36d2e8c6
Коммит
e02cf5905c
|
@ -138,7 +138,11 @@ exports.execute = (role, focusedWindow) => {
|
|||
if (webContentsMethod && focusedWindow != null) {
|
||||
const {webContents} = focusedWindow
|
||||
if (webContents) {
|
||||
webContents[webContentsMethod]()
|
||||
if (webContents.isDevToolsFocused()) {
|
||||
webContents.devToolsWebContents[webContentsMethod]()
|
||||
} else {
|
||||
webContents[webContentsMethod]()
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче