I use CefSharp to embed a browser into my .Net 8 core Winforms app. I load custom html and javascript into the browser with:
browser.LoadHtml(htmlStr, "http://pixemail.com/");
The javascript makes no AJAX calls, but does interact with C# app via:
await CefSharp.BindObjectAsync("fetchImagesAsync");
This stopped working with the CefSharp v126.2.70 release. Now, instead of displaying my htmlStr in the embedded browser, it tries to open http://pixemail.com/ in my desktop Chrome browser. Setting
cefSettings. ChromeRuntime = false;
makes the app work again. But, if I’m reading the release notes correctly, it will stop working in a future release of CEF.
How do I load and display custom Html in a way that will be compatible with future releases of CEF anc CefSharp?
I’ve tried x64 encoding the htmlStr and different urls in the
browser.LoadHtml(htmlStr, url);
call without success.