You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested using Electron.net API and CLI 8.31.2
ElectronJS lists the WebPreferences.ContextIsolation default value as false ([https://www.electronjs.org/docs/api/browser-window]).
ElectronNet API decorates the WebPreferences.ContextIsolation property with [DefaultValue(true)] which results in not setting this value in WindowManager.CreateWindowAsync when serializing "options" to a Json object.
init.ts:207 Error: contextBridge API can only be used when contextIsolation is enabled
at checkContextIsolationEnabled (context-bridge.ts:7)
at Object.exposeInMainWorld (context-bridge.ts:12)
When I remove the [DefaultValue(true)] decorator of the ContextIsolation property in the ElectronNet.Api, it seems to work as expected.
The text was updated successfully, but these errors were encountered:
I tested using Electron.net API and CLI 8.31.2
ElectronJS lists the WebPreferences.ContextIsolation default value as false ([https://www.electronjs.org/docs/api/browser-window]).
ElectronNet API decorates the WebPreferences.ContextIsolation property with [DefaultValue(true)] which results in not setting this value in WindowManager.CreateWindowAsync when serializing "options" to a Json object.
This is my ElectronBootstrap code:
doing so, results in this error in the browser:
When I remove the [DefaultValue(true)] decorator of the ContextIsolation property in the ElectronNet.Api, it seems to work as expected.
The text was updated successfully, but these errors were encountered: