[ 
https://issues.apache.org/jira/browse/CB-14188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16532702#comment-16532702
 ] 

wvengen commented on CB-14188:
------------------------------

For the use-case of deciding whether to open a link or not, it would be great 
if there would be a javascript event where a callback can return true for 
opening the link and false for not navigating. I have seen a [similar 
callback|https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,%20android.webkit.WebResourceRequest)]
 for the WebView on Android, for example, but the asynchronous nature of 
callbacks makes it more complicated to implement. Therefore, I'd like to go the 
route proposed here, and perhaps later we could add a more beautiful callback 
with return value.

> Allow http and https for AllowedSchemes
> ---------------------------------------
>
>                 Key: CB-14188
>                 URL: https://issues.apache.org/jira/browse/CB-14188
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-plugin-inappbrowser
>    Affects Versions: 3.0.0
>            Reporter: wvengen
>            Priority: Major
>
> CB-14013 introduced AllowedSchemes, but excluded the use of http and https. 
> It would be useful to allow intercepting http and https links, e.g. to decide 
> whether to open the link in the system web browser or not.
> I'd be happy to submit a PR (my approach would be to generate a regexp based 
> on AllowedSchemes and match the URL on that, instead of the current if logic).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to