Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
Add ELECTRON_INTERNAL_RENDERER_ASYNC_WEB_FRAME_METHOD support to init…
Browse files Browse the repository at this point in the history
…-without-node.js

This fixes executeJavaScript and probably some other stuff

Auditors: @bridiver
  • Loading branch information
bbondy committed Mar 17, 2016
1 parent a90a8cc commit 3d810ac
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/renderer/init-without-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ if (typeof KeyEvent === 'undefined') {
webFrame[method].apply(webFrame, args);
});

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);
};
args.push(responseCallback);
webFrame[method].apply(webFrame, args);
});

// copied from override.js
// TODO(bridiver) split this out and include in both
var sendHistoryOperation = function() {
Expand Down

0 comments on commit 3d810ac

Please sign in to comment.