[Pkg-javascript-commits] [sockjs-client] 150/434: Edited README.md via GitHub
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:10 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository sockjs-client.
commit fdf90adbf8b5940a1c3cb53ad6f9fe0142a3c00d
Author: majek <majek04 at gmail.com>
Date: Sat Sep 17 15:50:34 2011 +0200
Edited README.md via GitHub
---
README.md | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/README.md b/README.md
index 821b707..a50ed31 100644
--- a/README.md
+++ b/README.md
@@ -72,19 +72,20 @@ put that in your http head:
After the script is loaded you can establish a connection with the
SockJS server. Here's a simple example:
- <script>
- var sockjs = new SockJS('http://mydomain.com/my_prefix');
- sockjs.onopen = function() {
- console.log('open', e.data);
- };
- sockjs.onmessage = function(e) {
- console.log('message', e.data);
- };
- sockjs.onclose = function(e) {
- console.log('close', e.data);
- };
- </script>
-
+```javascript
+<script>
+ var sock = new SockJS('http://mydomain.com/my_prefix');
+ sock.onopen = function() {
+ console.log('open');
+ };
+ sock.onmessage = function(e) {
+ console.log('message', e.data);
+ };
+ sock.onclose = function() {
+ console.log('close');
+ };
+</script>
+```
SockJS-client API
-----------------
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list