Answer the question
In order to leave comments, you need to log in
How to add JS execution to CefSharp?
like adding a new method
CefSharpSettings.LegacyJavascriptBindingEnabled = true;
CefSharpSettings.WcfEnabled = true;
chromeBrowser.JavascriptObjectRepository.Register("DevForm_class", new DevForm_class(chromeBrowser, this), isAsync: false, options: BindingOptions.DefaultBinder);
public Form1()
// после
InitializeComponent();
InitializeChromium();
System.Exception: The ChromiumWebBrowser instance creates the underlying Chromium Embedded Framework (CEF) browser instance in an async fashion. The undelying CefBrowser instance is not yet initialized. Use the IsBrowserInitializedChanged event and check the IsBrowserInitialized property to determine when the browser has been initialized.
Answer the question
In order to leave comments, you need to log in
it was not about the babin - it would have been about the wires
, this was superfluous ▼
private void Form1_Load(object sender, EventArgs e)
{
chromeBrowser.ShowDevTools(); // этому здесь не место
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question