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
|
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.aspxIf 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!
|