Skip to content

Commit

Permalink
feat: Enable worldSafeExecuteJavaScript (#4135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffflorian committed Aug 13, 2020
1 parent b188c80 commit 579c3d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions electron/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ class ElectronWrapperInit {
webPreferences.preload = PRELOAD_RENDERER_JS;
webPreferences.spellcheck = enableSpellChecking;
webPreferences.webSecurity = true;
webPreferences.worldSafeExecuteJavaScript = true;
});
break;
}
Expand Down
4 changes: 1 addition & 3 deletions electron/src/renderer/preload-sso.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ const {webFrame, remote} = require('electron');
const {SingleSignOn} = remote.require('./sso/SingleSignOn');

//eslint-disable-next-line @typescript-eslint/no-floating-promises
(async () => {
await webFrame.executeJavaScript(SingleSignOn.getWindowOpenerScript());
})();
webFrame.executeJavaScript(SingleSignOn.getWindowOpenerScript());
1 change: 1 addition & 0 deletions electron/src/sso/SingleSignOn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export class SingleSignOn {
webSecurity: true,
webgl: false,
webviewTag: false,
worldSafeExecuteJavaScript: true,
},
width: this.windowOptions.width || 480,
});
Expand Down

0 comments on commit 579c3d5

Please sign in to comment.