Skip to content

Instantly share code, notes, and snippets.

@daviesgeek
Last active August 29, 2015 14:18
Show Gist options
  • Select an option

  • Save daviesgeek/42d3205aa6b76ec0c27f to your computer and use it in GitHub Desktop.

Select an option

Save daviesgeek/42d3205aa6b76ec0c27f to your computer and use it in GitHub Desktop.
WebViewJavascriptBridge callback
bridge.callHandler('tapped', {}, function (response) {
console.log(response) // an empty object
if(response) {
// do something
}
}
[bridge registerHandler:@"tapped" handler:^(id data, WVJBResponseCallback responseCallback) {
responseCallback([NSNumber numberWithBool:TRUE]);
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment