From 15d0531bc986c72bbd9207f5949f5d25160dbc37 Mon Sep 17 00:00:00 2001 From: Yuval Rosen <58216719+Yuvix25@users.noreply.github.com> Date: Tue, 20 Jun 2023 13:40:23 +0300 Subject: [PATCH] Update WebPreferences's ContextIsolation default value to true --- src/ElectronNET.API/Entities/WebPreferences.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ElectronNET.API/Entities/WebPreferences.cs b/src/ElectronNET.API/Entities/WebPreferences.cs index 12d8bf40..d15f1d7f 100644 --- a/src/ElectronNET.API/Entities/WebPreferences.cs +++ b/src/ElectronNET.API/Entities/WebPreferences.cs @@ -173,7 +173,7 @@ public class WebPreferences /// /// 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 @@ -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. /// - [DefaultValue(false)] - public bool ContextIsolation { get; set; } = false; + [DefaultValue(true)] + public bool ContextIsolation { get; set; } = true; /// /// Whether to use native window.open(). Defaults to false. This option is currently experimental.