DotNetBrowser vs CefSharp Comparison
Asked Answered
O

1

8

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?

Oistrakh answered 5/8, 2017 at 20:12 Comment(2)
It's worth noting that CefSharp is, at this moment, currently unsupported as the developer who graciously gave their time over the last two years has moved away from the project indefinitely. (Note future readers this comment was written when version 57.0.0 was the latest version)Eleonoreleonora
We wrote an article that compares two libraries, you can find it useful. No advertising, just technical stuff: blog.teamdev.com/…Chukar
G
6

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]");
Glutathione answered 10/8, 2017 at 12:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.