-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
Update WebPreferences's ContextIsolation default value to true #785
base: main
Are you sure you want to change the base?
Conversation
Thanks for your PR! Have you checked whether the IPC communication is still working afterwards? |
Not yet. Watching the "Contributing Getting Started" video as we speak. |
@GregorBiswanger I compiled it on my side, with the default value now being set to true, but I still get that error for some reason. Any idea what could be the cause? |
We changed the default value to Without an error message, I can't help you as to what your problem might be. |
These are the WebPreferences = new WebPreferences()
{
ContextIsolation = true,
EnableRemoteModule = true,
NodeIntegration = true,
Preload = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "js", "utils.js"),
} And this is the error I'm receiving:
Also, they did change the default value to |
Maybe I need to remove |
@GregorBiswanger any idea? |
I've encountered the following error: "Error: contextBridge API can only be used when contextIsolation is enabled", even though I did enable
ContextIsolation
.In #411, the same issue was reported, and the problem was traced down to the fact that the default value of
ContextIsolation
was set to the wrong value, which made that attribute un-editable.I then found out that the default value of
ContextIsolation
was changed from false to true since Electron 12, as noted here, so I fixed it.