Add a way to set worldSafeExecuteJavascript #617

Open
opened 2026-01-29 16:44:14 +00:00 by claunia · 0 comments
Owner

Originally created by @DelpireNI on GitHub (Jan 13, 2021).

Currently when looking at the debugger in the electron app, we get the following warning:

(electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12.

It seems that the way to fix this is to set worldSafeExecuteJavaScript to true and contextIsolation to true. Electron .NET has a WebPreferences class that currently allows ContextIsolation to be set to true, but there is no way to set worldSafeExecuteJavascript as far as I can tell.

Originally created by @DelpireNI on GitHub (Jan 13, 2021). Currently when looking at the debugger in the electron app, we get the following warning: ``` (electron) Security Warning: webFrame.executeJavaScript was called without worldSafeExecuteJavaScript enabled. This is considered unsafe. worldSafeExecuteJavaScript will be enabled by default in Electron 12. ``` It seems that the way to fix this is to set worldSafeExecuteJavaScript to true and contextIsolation to true. Electron .NET has a WebPreferences class that currently allows ContextIsolation to be set to true, but there is no way to set worldSafeExecuteJavascript as far as I can tell.
claunia added the Feature label 2026-01-29 16:44:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#617