Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated getWebContents() method #99

Closed
tidg opened this issue Feb 28, 2020 · 3 comments
Closed

Deprecated getWebContents() method #99

tidg opened this issue Feb 28, 2020 · 3 comments

Comments

@tidg
Copy link

tidg commented Feb 28, 2020

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!

@Prinzhorn
Copy link

Prinzhorn commented Mar 21, 2020

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

@ianwieds
Copy link

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

@sindresorhus
Copy link
Owner

a539dc4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants