Skip to content

Commit 15d0531

Browse files
committedJun 20, 2023
Update WebPreferences's ContextIsolation default value to true
1 parent 23f4d39 commit 15d0531

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
 

‎src/ElectronNET.API/Entities/WebPreferences.cs

+4-5
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public class WebPreferences
173173

174174
/// <summary>
175175
/// Whether to run Electron APIs and the specified preload script in a separate
176-
/// JavaScript context. Defaults to false. The context that the preload script runs
176+
/// JavaScript context. Defaults to true. The context that the preload script runs
177177
/// in will still have full access to the document and window globals but it will
178178
/// use its own set of JavaScript builtins (Array, Object, JSON, etc.) and will be
179179
/// isolated from any changes made to the global environment by the loaded page.The
@@ -182,11 +182,10 @@ public class WebPreferences
182182
/// content to ensure the loaded content cannot tamper with the preload script and
183183
/// any Electron APIs being used. This option uses the same technique used by . You
184184
/// can access this context in the dev tools by selecting the 'Electron Isolated
185-
/// Context' entry in the combo box at the top of the Console tab. This option is
186-
/// currently experimental and may change or be removed in future Electron releases.
185+
/// Context' entry in the combo box at the top of the Console tab.
187186
/// </summary>
188-
[DefaultValue(false)]
189-
public bool ContextIsolation { get; set; } = false;
187+
[DefaultValue(true)]
188+
public bool ContextIsolation { get; set; } = true;
190189

191190
/// <summary>
192191
/// Whether to use native window.open(). Defaults to false. This option is currently experimental.

0 commit comments

Comments
 (0)
Failed to load comments.