Rank: Newbie Groups: Member
Joined: 3/29/2017 Posts: 1
|
Hello! It is a very rare situation when WebView "freezes" and WebView.RenderUnresponsive event fired. And I don't know how to repeat it for debug purposes. The question is how to properly handle this situation to let application, that uses WebView, continue working. Is it right way to create a new WebView inside WebView.RenderUnresponsive event handler and assign it to the WebControl that hosts this WebView (in WPF application)?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This event usually occurs when your web page has runaway JavaScript code that does not return for a long period of time (for example, an infinite loop). The only way to recover from this situation is to kill the WebView. WebView.RenderUnresponsive provides you the opportunity to do so.The typical handling of this event is to ask the user if he wants to continue to wait. If user answers yes then do nothing, If user answers no, then you can recreate a new WebView and assign it to the WebControl. The old WebView will be automatically destroyed.
Thanks!
|