Welcome Guest Search | Active Topics | Sign In | Register

WebView.GetHTML() blocked Options
AdrianM
Posted: Thursday, August 20, 2015 9:38:43 AM
Rank: Newbie
Groups: Member

Joined: 2/19/2015
Posts: 3
Hi,
I'm using the class WebView without UI and I'm trying to get the HTML with the method GetHTML() after the WebView LoadCompleted Event is fired, but sometimes the program stays at this point and doesn't continue.

What are the conditions to use the GetHTML() method?

Thank you in advance
eo_support
Posted: Monday, August 24, 2015 2:34:33 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

If you use ThreadRunner, please try to delay GetHtml call using Post method:

http://www.essentialobjects.com/doc/eo.webbrowser.threadrunner.post_overload_1.aspx

If you already have a UI thread, you can use .NET's built-in SynchronizationContext.Post method:

https://msdn.microsoft.com/en-us/library/system.threading.synchronizationcontext.post(v=vs.110).aspx

The idea is you must let LoadCompleted event handler to return first before you call GetHtml.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.