erisu commented on a change in pull request #773: refactor: drop uiwebview &
add wkwebview
URL: https://github.com/apache/cordova-ios/pull/773#discussion_r376161077
##########
File path:
CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.m
##########
@@ -95,13 +95,8 @@ - (CDVIntentAndNavigationFilterValue) filterUrl:(NSURL*)url
return [[self class] filterUrl:url
intentsWhitelist:self.allowIntentsWhitelist
navigationsWhitelist:self.allowNavigationsWhitelist];
}
-#if WK_WEB_VIEW_ONLY
#define CDVWebViewNavigationTypeLinkClicked 0
#define CDVWebViewNavigationTypeOther 5
Review comment:
```
#define CDVWebViewNavigationTypeOther 5
```
Is a UIWebView specific value. For WKWebView, the WKNavigationType Other
value is `-1` and not `5`. I have updated this value to represent the correct
value for WKWebView.
The result of this value is used in the `shouldOverrideLoadWithRequest`
method.
It is what determines if a link should load when coming from something other
than an anchor tag. For example using `location.href` in JS. It is apart of the
`allow-intent` stuff.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]