Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
3.6.3
-
cordova 3.6.3
android 4.3
Description
JS injection in the onpageFinsh method in WebView
This is my code
public void onPageFinished(WebView view, String arg1) {
// TODO Auto-generated method stub
setTitle(cordovaWebView.getTitle());
if (!TextUtils.isEmpty(jsStr)) {
final StringBuilder js = new StringBuilder();
js.append(
"var newscript = document.createElement(\"script\");")
.append(jsStr)
.append("document.body.appendChild(newscript);");
if (android.os.Build.VERSION.SDK_INT < 19)
else
{ cordovaWebView.evaluateJavascript( "javascript:" + js.toString(), null); } }
}
Android 4.4 using evaluateJavascript does not appear to delay.