0

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 ?

asked Jan 5, 2021 at 8:21
1
  • why close ?this question is very clear and valuable for others、 Commented Jan 6, 2021 at 3:20

1 Answer 1

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

answered Jan 7, 2021 at 2:20
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.