Return null for no focused window when calling BrowserWindow.getFocusedWindow()

This commit is contained in:
Prince J Wesley 2016-01-11 12:48:35 +05:30
parent 9a707b7c69
commit 018ae5189b
2 changed files with 2 additions and 1 deletions

View file

@ -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()

View file

@ -287,7 +287,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)`