sindresorhus/electron-context-menu

Deprecated getWebContents() method

tidg opened this issue · 3 comments

tidg commented

Hi,
In the latest version of Electron v8.0.2, we notice webview.getWebContents()' is deprecated and will be removed. Please use 'remote.webContents.fromId(webview.getWebContentsId())' instead.

Is it possible to update
const webContents = win => win.webContents || (win.getWebContents && win.getWebContents());
to something like this to prevent this warning from causing a problem on the plugin in the future.
const webContents = win => win.webContents || electron.remote.webContents.fromId(win.getWebContentsId());

Thank you!

FYI remote will eventually be deprecated as well electron/electron#21408

This package is now broken on Electron 9.x.x because of this error it seems.