This commit is contained in:
Suresh, Kamlesh 2020-08-24 22:14:05 -04:00
parent db851b00a9
commit d2f334067a

View File

@ -134,7 +134,6 @@ extension WebView : WKUIDelegate {
while evaluateJavaScript "document.readyState",only works when webview contains userscrpt.otherwise, it would return WKErrorDomain Code=4 "A JavaScript exception occurred".
so webView.isLoading to check load finished state
*/
if !webView.isLoading {
webView.evaluateJavaScript("document.readyState", completionHandler: { (complete, error) in
if complete == nil {
return
@ -155,7 +154,6 @@ extension WebView : WKUIDelegate {
})
})
}
}
public func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {