mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-31 17:32:51 +08:00
CB-8317 Make it work to load about:blank and to dispatch exit message (close #149)
This commit is contained in:
parent
9e04eec9dd
commit
ccceaeaca2
@ -454,7 +454,7 @@ public class CordovaWebView extends WebView {
|
|||||||
if (LOG.isLoggable(LOG.DEBUG) && !url.startsWith("javascript:")) {
|
if (LOG.isLoggable(LOG.DEBUG) && !url.startsWith("javascript:")) {
|
||||||
LOG.d(TAG, ">>> loadUrlNow()");
|
LOG.d(TAG, ">>> loadUrlNow()");
|
||||||
}
|
}
|
||||||
if (url.startsWith("file://") || url.startsWith("javascript:") || internalWhitelist.isUrlWhiteListed(url)) {
|
if (url.startsWith("file://") || url.startsWith("javascript:") || url.startsWith("about:") || internalWhitelist.isUrlWhiteListed(url)) {
|
||||||
super.loadUrl(url);
|
super.loadUrl(url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -193,8 +193,8 @@ public class CordovaWebViewClient extends WebViewClient {
|
|||||||
@Override
|
@Override
|
||||||
public void onPageFinished(WebView view, String url) {
|
public void onPageFinished(WebView view, String url) {
|
||||||
super.onPageFinished(view, url);
|
super.onPageFinished(view, url);
|
||||||
// Ignore excessive calls.
|
// Ignore excessive calls, if url is not about:blank (CB-8317).
|
||||||
if (!isCurrentlyLoading) {
|
if (!isCurrentlyLoading && !url.startsWith("about:")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
isCurrentlyLoading = false;
|
isCurrentlyLoading = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user