/** * Notify the host application that a page has started loading. This method is called once for * each main frame load so a page with iframes or framesets will call onPageStarted one time for * the main frame. * * <p>In Crosswalk, this method is called for iframe navigations where the scheme is something * other than http or https, which includes assets with the Cordova project, so we have to test * for that, and not reset plugins in that case. * * @param view The webview initiating the callback. * @param url The url of the page. */ @Override public void onPageStarted(XWalkView view, String url) { // Only proceed if this is a top-level navigation if (view.getUrl() != null && view.getUrl().equals(url)) { // Flush stale messages. appView.onPageReset(); // Broadcast message that page has loaded appView.getPluginManager().postMessage("onPageStarted", url); } }