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

Fix Electron 9 compatibility #107

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Conversation

kondoumh
Copy link
Contributor

The webview.getWebContents method was removed in Electron 9.x.x so it no longer works when using WebView.

https://www.electronjs.org/docs/breaking-changes#planned-breaking-api-changes-90

So I used remote and it worked. I also confirmed that it works even if WebView is not used.

EnableRemoteModule must be true in WebPreference.

@sindresorhus
Copy link
Owner

They plan to remove the remote in Electron 10, so we need a different solution than this, unfortunately.

@sindresorhus sindresorhus changed the title Replace getWebContents method Fix Electron 9 compatibility Jul 6, 2020
@sindresorhus sindresorhus merged commit a539dc4 into sindresorhus:master Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants