Enable getting a window according to its attached devtools.
This commit is contained in:
parent
86ebd6e8e3
commit
f5fc26d8fc
3 changed files with 25 additions and 0 deletions
|
@ -55,4 +55,11 @@ BrowserWindow.fromProcessIdAndRoutingId = (processId, routingId) ->
|
|||
return window for window in windows when window.getProcessId() == processId and
|
||||
window.getRoutingId() == routingId
|
||||
|
||||
BrowserWindow.fromDevTools = (processId, routingId) ->
|
||||
windows = BrowserWindow.getAllWindows()
|
||||
for window in windows
|
||||
devtools = window.getDevTools()
|
||||
return window if devtools.processId == processId and
|
||||
devtools.routingId == routingId
|
||||
|
||||
module.exports = BrowserWindow
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue