Click or drag to resize
CefSharpSettingsLegacyJavascriptBindingEnabled Property
Version 63.0.0
Objects registered using RegisterJsObject and RegisterAsyncJsObject will be automatically bound in the first render process that's created for a ChromiumWebBrowser instance. If you perform a cross-site navigation a process switch will occur and bound objects will no longer be automatically avaliable. For those upgrading from version 57 or below that do no perform cross-site navigation (e.g. Single Page applications or applications that only refer to a single domain) can set this property to true and use the old behaviour.Defaults to false NOTE: Set this before your first call to RegisterJsObject or RegisterAsyncJsObject

Namespace: CefSharp
Assembly: CefSharp (in CefSharp.dll) Version: 63.0.0.0 (63.0.0.0)
Syntax
public static bool LegacyJavascriptBindingEnabled { get; set; }

Property Value

Type: Boolean
Remarks
Javascript binding in CefSharp version 57 and below used the --process-per-tab Process Model to limit the number of render processes to 1 per ChromiumWebBrowser instance, this allowed us to communicate bound javascript objects when the process was initially created (OnRenderViewReady is only called for the first process creation or after a crash), subsiquently all bound objects were registered in ever V8Context in OnContextCreated (executed in the render process). Chromium has made changes and --process-per-tab is not currently working. Performing a cross-site navigation (from one domain to a different domain) will cause a new render process to be created, subsiquent render processes won't have access to the bound object information by default.
See Also