Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DotNetBrowser vs CefSharp Comparison

I'm considering moving a project into an embedded WebView type architecture in a WinForm application and am considering DotNetBrowser and CefSharp.

After many searches I can't seem to find any comparison between the capabilities of the free CefSharp project vs the paid DotNetBrowser component. Is the primary difference the support options with DotNetBrowser are there other documented differences?

like image 272
frigon Avatar asked Aug 05 '17 20:08

frigon


1 Answers

The major difference between DotNetBrowser and CefSharp APIs is that DotNetBrowser provides the DOM layer API while CefSharp doesn't.

For example, in DotNetBrowser, you can get the DOM element using the following approach:

DOMDocument document = Browser.GetDocument();
DOMNode div = Browser.GetDocument().GetElementsByTagName("div").FirstOrDefault();

And then you can work with the DOM element using C#. For instance, DotNetBrowser supports subscribing to DOM events from .NET side.

To do this in CefSharp, you need to use JavaScript evaluation for working with DOM tree:

browser.GetMainFrame().ExecuteJavaScriptAsync("document.getElementsByTagName('div')[0]");

For the detailed API comparison, please drop a line to [email protected], and we’ll provide you with the results of our findings.

like image 105
Eugene Yakush Avatar answered Sep 21 '22 06:09

Eugene Yakush