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

ASF GitHub Bot commented on CB-14187:
-------------------------------------

wvengen commented on a change in pull request #274: CB-14187: (ios) Change the 
InAppBrowser to allow custom schemes
URL: 
https://github.com/apache/cordova-plugin-inappbrowser/pull/274#discussion_r206768695
 
 

 ##########
 File path: tests/tests.js
 ##########
 @@ -693,4 +698,29 @@ exports.defineManualTests = function (contentEl, 
createActionButton) {
             });
         });
     }, 'openHardwareBackDefaultAfterNo');
+
+    // Customscheme
+    createActionButton('customscheme', function () {
+        var ref = cordova.InAppBrowser.open('about:blank', '_blank', 
'hidden=yes');
+        var openedCustomscheme = false;
+        ref.addEventListener('loadstop', function (e) {
+            // Avoid showing the alert twice on iOS, since loadstop is also 
being called after the customscheme event.
+            if (!openedCustomscheme) {
+                openedCustomscheme = true;
+                ref.executeScript({ code: 
'window.location.replace("custom://test");' });
+            }
+        });
+        ref.addEventListener('customscheme', function (e) {
+            if (e && e.url === "custom://test") {
 
 Review comment:
   Thanks! I went for the bonus in 93077ef (hoping it will help motivate you to 
complete the review ;) ). Tested it still works (Android).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> cordova-plugin-inappbrowser AllowedSchemes for iOS
> --------------------------------------------------
>
>                 Key: CB-14187
>                 URL: https://issues.apache.org/jira/browse/CB-14187
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: cordova-plugin-inappbrowser
>    Affects Versions: 3.0.0
>            Reporter: wvengen
>            Priority: Major
>
> CB-14013 add support for custom url schemes with the AllowedSchemes 
> preference. This only works on Android, however. It would be very useful to 
> have this on iOS (and other platforms) as well.
> A pull request for iOS will follow.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to