From bf3e0246489cc76b1dfb312b62402fa206158bec Mon Sep 17 00:00:00 2001 From: Ian Clelland Date: Thu, 18 Apr 2013 14:20:10 -0400 Subject: [PATCH] [CB-3066] Fire onNativeReady from JS, as bridge is available immediately --- .../src/org/apache/cordova/CordovaWebViewClient.java | 9 --------- 1 file changed, 9 deletions(-) diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java index 4751fc3b..4b006153 100755 --- a/framework/src/org/apache/cordova/CordovaWebViewClient.java +++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java @@ -314,15 +314,6 @@ public class CordovaWebViewClient extends WebViewClient { // Clear timeout flag this.appView.loadUrlTimeout++; - // Try firing the onNativeReady event in JS. If it fails because the JS is - // not loaded yet then just set a flag so that the onNativeReady can be fired - // from the JS side when the JS gets to that code. - if (!url.equals("about:blank")) { - LOG.d(TAG, "Trying to fire onNativeReady"); - this.appView.loadUrl("javascript:try{ cordova.require('cordova/channel').onNativeReady.fire();}catch(e){_nativeReady = true;}"); - this.appView.postMessage("onNativeReady", null); - } - // Broadcast message that page has loaded this.appView.postMessage("onPageFinished", url);