README.md in browser_app_base-0.0.8 vs README.md in browser_app_base-0.0.9
- old
+ new
@@ -71,9 +71,37 @@
"chrome_win": "start chrome",
"chrome_linux": "/bin/google-chrome"
}
```
+## Send a message from your browser application to your ruby application
+
+Use the send_message function
+
+main.js sample
+```javascript
+$("#exec").click(function () {
+ send_message("exec:" + $("#upFile").val());
+});
+
+```
+
+## Send a message from the ruby application to the browser application
+
+Use the app_send function
+
+my_app_sample.rb sample
+```ruby
+class MyApp < AppMainBase
+ def start(argv)
+ # popup message
+ app_send("popup:message string")
+
+ # log message
+ yield "log message"
+ end
+end
+```
## Development
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).