|After the latest updated of the Android System Webview (52.0.2743.98) I noticed that javascript can't be executed withing the onJsAlert method.
More specifically the following piece of code stopped working after the latest update
private class MyWebChromeClient extends WebChromeClient {
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
view.loadUrl(javascript:(function(){CustomInterface.completeAction(document.head.innerHTML)})());
return super.onJsAlert(view, url, message, result);
}
}
I have also checked that the interface has been set correctly
mWebView.setWebChromeClient(new MyWebChromeClient());
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
mWebView.addJavascriptInterface(new CustomInterface(), "CustomInterface");
Has anyone came across the same issue?