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

Update WebPreferences's ContextIsolation default value to true #785

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/ElectronNET.API/Entities/WebPreferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public class WebPreferences

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

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