fix(ios-webview): report hostname lookup errors in loadFinished event (#6988)

This commit is contained in:
Ben Sjoberg
2019-03-18 11:29:24 -05:00
committed by Manol Donev
parent 96d9d191a2
commit e6486f6c0f

View File

@@ -77,6 +77,20 @@ class WKNavigationDelegateImpl extends NSObject
}
}
public webViewDidFailProvisionalNavigationWithError(webView: WKWebView, navigation: WKNavigation, error: NSError): void {
const owner = this._owner.get();
if (owner) {
let src = owner.src;
if (webView.URL) {
src = webView.URL.absoluteString;
}
if (traceEnabled()) {
traceWrite("WKNavigationDelegateClass.webViewDidFailProvisionalNavigationWithError(" + error.localizedDescription + ")", traceCategories.Debug);
}
owner._onLoadFinished(src, error.localizedDescription);
}
}
}
export class WebView extends WebViewBase {