From 48ad571a59bc8ee292b7f66d7fd24df940dab95c Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 15 Jul 2020 19:45:59 -0700 Subject: [PATCH] electron 10: re-enable remote module Electron 10 disables the remote module by default. We've always tried to avoid using `remote` in WTD so there aren't many occurrances of it, but there are still a few places where we use it --- package.json | 2 +- src/main/windows/about.js | 3 ++- src/main/windows/main.js | 3 ++- src/main/windows/webtorrent.js | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 794641a6..1073b870 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "buble": "^0.20.0", "cross-zip": "^3.1.0", "depcheck": "^1.0.0", - "electron": "^10.0.0-beta.11", + "electron": "~10.0.0-beta.11", "electron-osx-sign": "^0.4.17", "electron-packager": "^15.0.0", "electron-winstaller": "^4.0.1", diff --git a/src/main/windows/about.js b/src/main/windows/about.js index 52c3a1c3..3e0e3e6b 100644 --- a/src/main/windows/about.js +++ b/src/main/windows/about.js @@ -26,7 +26,8 @@ function init () { useContentSize: true, webPreferences: { nodeIntegration: true, - enableBlinkFeatures: 'AudioVideoTracks' + enableBlinkFeatures: 'AudioVideoTracks', + enableRemoteModule: true }, width: 300 }) diff --git a/src/main/windows/main.js b/src/main/windows/main.js index 10967bff..2bff63b4 100644 --- a/src/main/windows/main.js +++ b/src/main/windows/main.js @@ -44,7 +44,8 @@ function init (state, options) { width: initialBounds.width, webPreferences: { nodeIntegration: true, - enableBlinkFeatures: 'AudioVideoTracks' + enableBlinkFeatures: 'AudioVideoTracks', + enableRemoteModule: true }, x: initialBounds.x, y: initialBounds.y diff --git a/src/main/windows/webtorrent.js b/src/main/windows/webtorrent.js index dfb723f7..a0828a61 100644 --- a/src/main/windows/webtorrent.js +++ b/src/main/windows/webtorrent.js @@ -26,7 +26,8 @@ function init () { useContentSize: true, webPreferences: { nodeIntegration: true, - enableBlinkFeatures: 'AudioVideoTracks' + enableBlinkFeatures: 'AudioVideoTracks', + enableRemoteModule: true }, width: 150 })