Merge pull request #401 from GEDYSIntraWare/bridge
Move bridge creation to injectDeferredObject
This commit is contained in:
commit
80feff6cf8
@ -363,6 +363,7 @@ static CDVUIInAppBrowser* instance = nil;
|
|||||||
|
|
||||||
- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper
|
- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper
|
||||||
{
|
{
|
||||||
|
[self createIframeBridge];
|
||||||
if (jsWrapper != nil) {
|
if (jsWrapper != nil) {
|
||||||
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
|
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
|
||||||
NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
|
||||||
@ -565,7 +566,6 @@ static CDVUIInAppBrowser* instance = nil;
|
|||||||
|
|
||||||
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
|
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
|
||||||
{
|
{
|
||||||
[self createIframeBridge];
|
|
||||||
if (self.callbackId != nil) {
|
if (self.callbackId != nil) {
|
||||||
// TODO: It would be more useful to return the URL the page is actually on (e.g. if it's been redirected).
|
// TODO: It would be more useful to return the URL the page is actually on (e.g. if it's been redirected).
|
||||||
NSString* url = [self.inAppBrowserViewController.currentURL absoluteString];
|
NSString* url = [self.inAppBrowserViewController.currentURL absoluteString];
|
||||||
|
Loading…
Reference in New Issue
Block a user