aboutsummaryrefslogtreecommitdiffstats
path: root/src/electron-util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/electron-util.ts')
-rw-r--r--src/electron-util.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/electron-util.ts b/src/electron-util.ts
index 3c395ab10..eede55786 100644
--- a/src/electron-util.ts
+++ b/src/electron-util.ts
@@ -1,7 +1,7 @@
1// Enhanced from: https://github.com/dertieran/electron-util/blob/replace-remote/source/api.js 1// Enhanced from: https://github.com/dertieran/electron-util/blob/replace-remote/source/api.js
2 2
3import * as electron from 'electron'; 3import * as electron from 'electron';
4import { initialize } from '@electron/remote/main'; 4import { initialize, enable } from '@electron/remote/main';
5 5
6export const initializeRemote = () => { 6export const initializeRemote = () => {
7 if (process.type !== 'browser') { 7 if (process.type !== 'browser') {
@@ -13,6 +13,10 @@ export const initializeRemote = () => {
13 initialize(); 13 initialize();
14}; 14};
15 15
16export const enableWebContents = (webContents: electron.WebContents) => {
17 enable(webContents);
18}
19
16export const remote = new Proxy( 20export const remote = new Proxy(
17 {}, 21 {},
18 { 22 {