forked from marcuswestin/WebViewJavascriptBridge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7da3196
commit 9492ed9
Showing
1 changed file
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
intended v0.0.1 | ||
+ ObjC: A WebViewJavascriptBridge class (a UIWebViewDelegate) that enables message passing to and from the JS | ||
+ ObjC: A protocol called WebViewJavascriptBridgeDelegate that lets you handle messages received from the JS | ||
+ JS: Event when the bridge is ready - document.addEventListener('WebViewJavascriptBridgeReady', function() {}, false) | ||
+ JS: Ability to set your message handler - WebViewJavascriptBridge.setMessageHandler(function() {}) | ||
+ JS: Function to send messages - WebViewJavascriptBridge.sendMessage('a message'); | ||
+ All messages are strings. Use JSON in your js and e.g. JSONKit in iOS to send structured messages |