You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by da...@apache.org on 2019/09/24 15:21:24 UTC
[cordova-plugin-inappbrowser] branch master updated: (ios) Move
createIframeBridge to injectDeferredObject
This is an automated email from the ASF dual-hosted git repository.
davealden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-plugin-inappbrowser.git
The following commit(s) were added to refs/heads/master by this push:
new e3db974 (ios) Move createIframeBridge to injectDeferredObject
new 80feff6 Merge pull request #401 from GEDYSIntraWare/bridge
e3db974 is described below
commit e3db974080abed8ca022a1ed4bfcda3e265ef246
Author: Niklas Merz <nm...@gedys-intraware.de>
AuthorDate: Wed Jan 16 14:18:35 2019 +0100
(ios) Move createIframeBridge to injectDeferredObject
Avoid failed script injections for pages which did not finish loading.
---
src/ios/CDVUIInAppBrowser.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ios/CDVUIInAppBrowser.m b/src/ios/CDVUIInAppBrowser.m
index 5e3e900..d2cea12 100644
--- a/src/ios/CDVUIInAppBrowser.m
+++ b/src/ios/CDVUIInAppBrowser.m
@@ -362,6 +362,7 @@ static CDVUIInAppBrowser* instance = nil;
- (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper
{
+ [self createIframeBridge];
if (jsWrapper != nil) {
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
@@ -564,7 +565,6 @@ static CDVUIInAppBrowser* instance = nil;
- (void)webViewDidFinishLoad:(UIWebView*)theWebView
{
- [self createIframeBridge];
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).
NSString* url = [self.inAppBrowserViewController.currentURL absoluteString];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org