зеркало из https://github.com/electron/electron.git
Merge pull request #4057 from princejwesley/browser-window
Return null for no focused window when calling BrowserWindow.getFocusedWindow
This commit is contained in:
Коммит
9e82334b67
|
@ -66,6 +66,7 @@ BrowserWindow::_init = ->
|
|||
BrowserWindow.getFocusedWindow = ->
|
||||
windows = BrowserWindow.getAllWindows()
|
||||
return window for window in windows when window.isFocused()
|
||||
null
|
||||
|
||||
BrowserWindow.fromWebContents = (webContents) ->
|
||||
windows = BrowserWindow.getAllWindows()
|
||||
|
|
|
@ -289,7 +289,7 @@ Returns an array of all opened browser windows.
|
|||
|
||||
### `BrowserWindow.getFocusedWindow()`
|
||||
|
||||
Returns the window that is focused in this application.
|
||||
Returns the window that is focused in this application, otherwise returns `null`.
|
||||
|
||||
### `BrowserWindow.fromWebContents(webContents)`
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче