fix: create WebContents for webview on request (#13761)

This commit is contained in:
trop[bot] 2018-07-21 16:51:31 +09:00 committed by Cheng Zhao
parent f4ff97038c
commit 4333020157
5 changed files with 31 additions and 8 deletions

View file

@ -100,6 +100,9 @@ module.exports = {
ipcRenderer.send('ELECTRON_GUEST_VIEW_MANAGER_CREATE_GUEST', params, requestId)
ipcRenderer.once(`ELECTRON_RESPONSE_${requestId}`, callback)
},
createGuestSync: function (params) {
return ipcRenderer.sendSync('ELECTRON_GUEST_VIEW_MANAGER_CREATE_GUEST_SYNC', params)
},
attachGuest: function (elementInstanceId, guestInstanceId, params) {
ipcRenderer.send('ELECTRON_GUEST_VIEW_MANAGER_ATTACH_GUEST', elementInstanceId, guestInstanceId, params)
webFrame.attachGuest(elementInstanceId)