Make remote.getCurrentWindow work for devtools.
This commit is contained in:
parent
f5fc26d8fc
commit
03e6d564d7
1 changed files with 1 additions and 0 deletions
|
@ -98,6 +98,7 @@ ipc.on 'ATOM_BROWSER_CURRENT_WINDOW', (event, processId, routingId) ->
|
||||||
try
|
try
|
||||||
BrowserWindow = require 'browser-window'
|
BrowserWindow = require 'browser-window'
|
||||||
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
|
window = BrowserWindow.fromProcessIdAndRoutingId processId, routingId
|
||||||
|
window = BrowserWindow.fromDevTools processId, routingId unless window?
|
||||||
event.returnValue = valueToMeta processId, routingId, window
|
event.returnValue = valueToMeta processId, routingId, window
|
||||||
catch e
|
catch e
|
||||||
event.returnValue = errorToMeta e
|
event.returnValue = errorToMeta e
|
||||||
|
|
Loading…
Reference in a new issue