electron-in-action / firesale

Mozilla Public License 2.0
74 stars 41 forks source link

Remote is depricated #8

Open iamchathu opened 4 years ago

iamchathu commented 4 years ago

Seems electron is going to remove remote from Electron.

robertpatrick commented 3 years ago

@iamchathu you can work around any issue in newer versions of Electron by passing the appropriate webPreferences into the BrowserWindow constructor. For example:

  let newWindow = new BrowserWindow({
    x, y, show: false,
    "webPreferences": {
      nodeIntegration: true,
      contextIsolation: false,
      enableRemoteModule: true
    }
  })

Obviously, this will stop working in Electron 12.