run webframe methods for webview in its context
This commit is contained in:
parent
8386baf267
commit
1235907835
5 changed files with 32 additions and 27 deletions
|
@ -38,7 +38,7 @@ electron.ipcRenderer.on('ELECTRON_INTERNAL_RENDERER_WEB_FRAME_METHOD', (event, m
|
|||
|
||||
electron.ipcRenderer.on('ELECTRON_INTERNAL_RENDERER_ASYNC_WEB_FRAME_METHOD', (event, requestId, method, args) => {
|
||||
const responseCallback = function(result) {
|
||||
event.sender.send('ELECTRON_INTERNAL_RENDERER_ASYNC_WEB_FRAME_RESPONSE_' + requestId, result);
|
||||
event.sender.send(`ELECTRON_INTERNAL_BROWSER_ASYNC_WEB_FRAME_RESPONSE_${requestId}`, result);
|
||||
};
|
||||
args.push(responseCallback);
|
||||
electron.webFrame[method].apply(electron.webFrame, args);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue