Cefsharp: How to get HtmlDocument?

Created on 15 Aug 2015  ·  4Comments  ·  Source: cefsharp/CefSharp

Like ie WebBrowser:
WebBrowser.Document.GetElementById(string id);
I am a new user of CefSharp.
thanks!

Most helpful comment

@looselive EO.WebBrowser is about $400 .. CefSharp is provided to you for free. Have a little appreciation for people'a hardwork that they provide to you for free ...

All 4 comments

There is no direct access to the DOM.

You can either use Javascript Binding or simply execute some javascript directly.

https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#2-how-do-you-call-a-javascript-method-that-return-a-result
https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#3-how-do-you-expose-a-net-class-to-javascript

(In general, probably a good idea to read the FAQ)

It's not convenient, I found a Library named “EO.WebBrowser”, it seems pretty good

Great!

@looselive EO.WebBrowser is about $400 .. CefSharp is provided to you for free. Have a little appreciation for people'a hardwork that they provide to you for free ...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

29683747 picture 29683747  ·  7Comments

zhuangpearl picture zhuangpearl  ·  4Comments

amaitland picture amaitland  ·  3Comments

mihailik picture mihailik  ·  4Comments

avspeed picture avspeed  ·  6Comments