In my test code , I open the http://www.qq.com/ with a WKWebView . And I found that ,there will be 3 delegate methods to be called:
webView:(WKWebView *)webView decidePolicyForNavigationAction:
webView:(WKWebView *)webView didStartProvisionalNavigation:
webView:(WKWebView *)webView didFinishNavigation:
And these two method will never be called
webView:(WKWebView *)webView decidePolicyForNavigationResponse:
webView:(WKWebView *)webView didCommitNavigation:
And I want to know what make the method to be called or not ?
-
why close ?this question is very clear and valuable for others、ximmyxiao– ximmyxiao2021年01月06日 03:20:42 +00:00Commented Jan 6, 2021 at 3:20
1 Answer 1
OK, I found the reason here: it's because my webview is using the WebViewJavaScriptBridge , and this bridge cause the two method will not be called . so if u need these two method to working ,do it as follows https://blog.csdn.net/zyx980193917/article/details/107064789
Comments
Explore related questions
See similar questions with these tags.