Open JasonLiSZ opened 3 years ago
@JasonLiSZ Is this pr fix working for you for the latest version of the electron (i.e. 12 or higher)? I tried to copy your changes to the devtron repo and started and loaded locally. When I tried to install in the Console
tab of the devtool then throws another error: Cannot read property 'defaultSession' of undefined
. I suspect that if you try to require the whole electron object in the api.js
file and try log in the console then you'll see some of the main module objects are not there (i.e undefined) [remote, session]. Thats why it has been throwing for BrowserWindow undefined at first place despite having the method getDevToolsExtensions
is deprecated though.
…tall devtron
As the methods of: electron.remote.BrowserWindow.getDevToolsExtensions was obsolete, this fix is trying to locate get/add/remove extension methods in [session] instead of BrowserWindow.