You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/11/20 00:35:56 UTC

ios commit: InAppBrowser - pass on window options for _self if url is not in the whitelist (which is kicked out to the InAppBrowser)

Updated Branches:
  refs/heads/master 26a6535c7 -> cc9c2bedc


InAppBrowser - pass on window options for _self if url is not in the whitelist (which is kicked out to the InAppBrowser)


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/cc9c2bed
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/cc9c2bed
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/cc9c2bed

Branch: refs/heads/master
Commit: cc9c2bedc190cff0061f98920b63b216685b2894
Parents: 26a6535
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Nov 19 15:35:49 2012 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Nov 19 15:35:49 2012 -0800

----------------------------------------------------------------------
 CordovaLib/Classes/CDVInAppBrowser.m |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/cc9c2bed/CordovaLib/Classes/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVInAppBrowser.m b/CordovaLib/Classes/CDVInAppBrowser.m
index 2d87ea7..f36cddf 100644
--- a/CordovaLib/Classes/CDVInAppBrowser.m
+++ b/CordovaLib/Classes/CDVInAppBrowser.m
@@ -62,7 +62,7 @@
         NSString* options = (argc > 2) ? [arguments objectAtIndex:2] : @"";
 
         if ([target isEqualToString:kInAppBrowserTargetSelf]) {
-            [self openInCordovaWebView:url];
+            [self openInCordovaWebView:url withOptions:options];
         } else if ([target isEqualToString:kInAppBrowserTargetSystem]) {
             [self openInSystem:url];
         } else { // _blank or anything else
@@ -95,7 +95,7 @@
     [self.inAppBrowserViewController navigateTo:url];
 }
 
-- (void)openInCordovaWebView:(NSString*)url
+- (void)openInCordovaWebView:(NSString*)url withOptions:(NSString*)options
 {
     NSURL* urlObj = [NSURL URLWithString:url];
     BOOL passesWhitelist = YES;
@@ -113,7 +113,7 @@
         NSURLRequest* request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
         [self.webView loadRequest:request];
     } else { // TODO: this assumes the InAppBrowser can be excepted from the white-list
-        [self openInInAppBrowser:url withOptions:@""];
+        [self openInInAppBrowser:url withOptions:options];
     }
 }