Closed arturogrc closed 11 years ago
This is not currently available in CefSharp
but the "CefSharp Windows Forms Example" can show the source code using the context menu, is there a way to pass this result (src****.txt) to string?
You can use a bit of javascript...
webView.EvaluateScript(@"document.getElementsByTagName ('html')[0].innerHTML").ToString();
Is this still not possible except by using the javascript hack above? I ask cause I'm trying to read a huge page html and through javascript it hangs for more than a minute.
Thanks
Ouch, I should have checked all methods and parameters before asking.
If you don't mind me asking is there a solution to get the source of a specific frame on the page? In my case I need to grab the source from the third frame on the page to parse some values using htmlagilitypack.
Thanks a lot man.
If you don't mind me asking is there a solution to get the source of a specific frame on the page? In my case I need to grab the source from the third frame on the page to parse some values using htmlagilitypack.
In the current version no, it's limited to the main frame.
Next version (master
branch) is a major rewrite, as part of that there's access to the individual frames.
https://github.com/cefsharp/CefSharp/blob/master/CefSharp/IFrame.cs#L66
How to get the current page source code as string from my webview control?