Skip to content

Commit 80feff6

Browse files
authored
Merge pull request #401 from GEDYSIntraWare/bridge
Move bridge creation to injectDeferredObject
2 parents ba345b0 + e3db974 commit 80feff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ios/CDVUIInAppBrowser.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ -(void)createIframeBridge
363363

364364
- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper
365365
{
366+
[self createIframeBridge];
366367
if (jsWrapper != nil) {
367368
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
368369
NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
@@ -565,7 +566,6 @@ - (void)webViewDidStartLoad:(UIWebView*)theWebView
565566

566567
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
567568
{
568-
[self createIframeBridge];
569569
if (self.callbackId != nil) {
570570
// TODO: It would be more useful to return the URL the page is actually on (e.g. if it's been redirected).
571571
NSString* url = [self.inAppBrowserViewController.currentURL absoluteString];

0 commit comments

Comments
 (0)