chore: misc cleanup (#16037)

This commit is contained in:
Milan Burda 2018-12-12 22:31:16 +01:00 committed by Charles Kerr
parent 1152fecb75
commit c65a0d90b8
5 changed files with 17 additions and 20 deletions

View file

@ -311,7 +311,9 @@ exports.getCurrentWindow = () => {
// Get current WebContents object.
exports.getCurrentWebContents = () => {
return metaToValue(ipcRenderer.sendSync('ELECTRON_BROWSER_CURRENT_WEB_CONTENTS', contextId))
const command = 'ELECTRON_BROWSER_CURRENT_WEB_CONTENTS'
const meta = ipcRenderer.sendSync(command, contextId)
return metaToValue(meta)
}
// Get a global object in browser.