A lightweight javascript bridge to cocoa
THIS PROJECT IS NO LONGER UNDER ACTIVE DEVELOPMENT.
You may consider this project alternativelly, https://github.com/marcuswestin/WebViewJavascriptBridge
TGJSBridge *jsBridge = [TGJSBridge jsBridgeWithDelegate: webViewDelegate];
webView.delegate = jsBridge;
postNotificationName:userInfo:toWebView:
- (void)jsBridge:(TGJSBridge *)bridge didReceivedNotificationName:(NSString *)name userInfo:(NSDictionary *)userInfo fromWebView:(UIWebView *)webview
jsBridge.postNotification(msgName,userInfo);
jsBridge.bind(msgName, function(userInfo){
...
});
jsBridge.unbind('test',callbackHandler);
Copyright © 2012 Chao Shen(Hangzhou Jiuyan Technology Co., Ltd.). This software is licensed under the BSD License.