mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Cache remote.getCurrentWindow.
This commit is contained in:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user