cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-14188) Callback to decide whether to open link or not.
Date Wed, 03 Oct 2018 22:45:00 GMT

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

ASF subversion and git services commented on CB-14188:
------------------------------------------------------

Commit 228703a63b088cbb635aa58f8a1015a9d5d818ab in cordova-plugin-inappbrowser's branch refs/heads/master
from [~wvengen]
[ https://gitbox.apache.org/repos/asf?p=cordova-plugin-inappbrowser.git;h=228703a ]

CB-14188: add beforeload event, catching navigation before it happens


> Callback to decide whether to open link or not.
> -----------------------------------------------
>
>                 Key: CB-14188
>                 URL: https://issues.apache.org/jira/browse/CB-14188
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: cordova-plugin-inappbrowser
>    Affects Versions: 3.0.0
>            Reporter: wvengen
>            Priority: Major
>
> Several times I've found myself wanting to tell inAppBrowser whether it can open a link
in the embedded webview or using the system web browser. It would be great if there's a callback
_before_ loading a page (loadstart is too late there), where I can tell inAppBrowser to load
the page or not.
> 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.- At first I thought this mechanism could be used, but because
of the asynchronous nature of Cordova callbacks, this didn't work out, and I added a beforeload
callback. See comment for an example.
> I've submitted 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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message