Rank: Advanced Member Groups: Member
Joined: 11/3/2015 Posts: 65
|
Hello,
in the new version you send an exception if the program uses EvalScript. So I changed it to use QueueScriptCall.
It was some hard work, because I often use it to read data from the browsers frontend.
After I eliminated all EvalScript calls, I still get the message: EO.WebBrowser.JSInvokeException: EvalScript failed because script engine is not ready or is shutdown before the script can finish. Please use QueueScriptCall instead of EvalScript to execute JavaScript code in this case.
It turns out, that the reason was, that I use: var String = MyWebControl.WebView.GetDOMWindow().document.body.innerHTML;
So I changed it to var String = MyWebControl.WebView.GetHtml();
sometime it works, but sometimes it does not work and crashes without any exception. All I want is to get the HTML Text of the WebView. Is there any other way to get it?
Best regards
Marius
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, This usually occurs when you call it too soon. However GetHtml should always work. If you run into crash, please try to isolate the problem into a test project and send the test project to us. See here for more details: https://www.essentialobjects.com/forum/test_project.aspxThanks!
|
Rank: Advanced Member Groups: Member
Joined: 11/3/2015 Posts: 65
|
Hi,
okay, now I'm waiting for LoadCompleted ... that seems to help.
|