Hi,
Allow me to re-open this topic as we are running again into this same situation. There is definitely something wrong on the web page and they will try to work on this but basically I have implemented the handler as follow:
Code: C#
private void webView_RenderUnresponsive(object sender, RenderUnresponsiveEventArgs e)
{
TraceConsoleViewer("Page Unresponsive: [" + e.JavaScriptStackTrace + "]");
MessageBoxResult res = MessageBox.Show("The web page has become unresponsive.\n"+e.JavaScriptStackTrace+"\n\nDo you want to close it now? (if no, you application may become unstable)", "Page is unresponsive", MessageBoxButton.YesNo, MessageBoxImage.Warning,MessageBoxResult.No);
if (res == MessageBoxResult.Yes)
{
CloseMe();
}
}
I do get my popup with some stack trace but even if I chose to continue, it will never recover. The popup will come again a few time until eventually the worker thread itself dies.
The situation with chrome native is slightly different, we get the popup kill or wait, but if one does not answer, the popup eventually disappears by itself and the page become responsive again. I was able to recover the same way with Chrome native v54.
So I do realize that at this point, things become quite unpredictable and that I might just be lucky that Chrome recovers, but I was wondering if there is anything better than I can do when handling this event?
For instance, is there a way to find out the webView is no longer unresponsive? It looks like Chrome native has a way to find out when it becomes responsive again.
I apologize to use your expertise to work around what looks like a wrong design on the javascript side, but my users are kind of expecting the same outcome on this dedicated browser as with Chrome.
So any suggestion will be very welcome!
Thank you many in advance.
Regards