fix
This commit is contained in:
parent
db851b00a9
commit
d2f334067a
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user