/** * Load a url from the network or the filesystem into the main frame. Following the same behaviour * as Safari, javascript: URLs are not passed to the main frame, instead they are evaluated * immediately. * * @param url The url to load. */ public void loadUrl(String url) { mLoadInitFromJava = true; if (URLUtil.isJavaScriptUrl(url)) { // strip off the scheme and evaluate the string stringByEvaluatingJavaScriptFromString(url.substring("javascript:".length())); } else { nativeLoadUrl(url); } mLoadInitFromJava = false; }