Repository: cordova-osx Updated Branches: refs/heads/master 599acc55e -> e648de696
CB-9818 Reloading the webview in OSX looses the CordovaBridgeUti Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/b1f4889c Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/b1f4889c Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/b1f4889c Branch: refs/heads/master Commit: b1f4889c9ada7fe005c6a183fb805d510990651e Parents: eecce47 Author: Tobias Bocanegra <tri...@adobe.com> Authored: Fri Oct 16 16:18:42 2015 -0700 Committer: Tobias Bocanegra <tri...@adobe.com> Committed: Fri Oct 16 16:18:42 2015 -0700 ---------------------------------------------------------------------- CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/b1f4889c/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m ---------------------------------------------------------------------- diff --git a/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m b/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m index d318946..4d83f54 100644 --- a/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m +++ b/CordovaLib/CordovaLib/Classes/CDVWebViewDelegate.m @@ -43,9 +43,9 @@ } [windowScriptObject setValue:self.console forKey:@"console"]; - if (self.bridge == nil) { - self.bridge = [[CDVBridge alloc] initWithWebView:webView andViewController:self.viewController]; - } + // allways re-initialized bridge to that it can add the helper methods on the webview's window + self.bridge = [[CDVBridge alloc] initWithWebView:webView andViewController:self.viewController]; + [windowScriptObject setValue:self.bridge forKey:@"cordovabridge"]; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cordova.apache.org For additional commands, e-mail: commits-h...@cordova.apache.org