Cache remote.getCurrentWindow.
This commit is contained in:
parent
ec43f740a7
commit
73d4b01597
1 changed files with 3 additions and 1 deletions
|
@ -68,9 +68,11 @@ exports.getObject = (id) ->
|
|||
metaToValue meta
|
||||
|
||||
# Get current window object.
|
||||
windowCache = null
|
||||
exports.getCurrentWindow = ->
|
||||
return windowCache if windowCache?
|
||||
meta = ipc.sendChannelSync 'ATOM_BROWSER_CURRENT_WINDOW'
|
||||
metaToValue meta
|
||||
windowCache = metaToValue meta
|
||||
|
||||
# Get a global object in browser.
|
||||
exports.getGlobal = (name) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue