Skip to content

Commit

Permalink
added didFinish method to satisfy WKNavigationDelegate and prevent us…
Browse files Browse the repository at this point in the history
…er crash
  • Loading branch information
sergiothinks2 committed Jan 30, 2025
1 parent 55fc0a9 commit 56a7508
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,15 @@ extension WKNavigationDelegateProxy: WKNavigationDelegate {
// call original
originalDelegate?.webView?(webView, didFail: navigation, withError: error)
}

func webView(_ webView: WKWebView,
didFinish navigation: WKNavigation!
) {
// Capture navigation event
callback?(webView.url, nil)

// Call original delegate's implementation if available
originalDelegate?.webView?(webView, didFinish: navigation)
}
}
#endif

0 comments on commit 56a7508

Please sign in to comment.