From da7cb9eb0a4f10336481656e9449209fb3537c79 Mon Sep 17 00:00:00 2001 From: HawkOwl Date: Mon, 13 Jul 2015 13:13:05 +0800 Subject: [PATCH] minor doc fix --- docs/getting-started.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/getting-started.rst b/docs/getting-started.rst index 00c8db2..63b433d 100644 --- a/docs/getting-started.rst +++ b/docs/getting-started.rst @@ -175,7 +175,9 @@ to test your new code:: socket.onmessage = function(e) { alert(e.data); } - socket.send("hello world"); + socket.onopen = function() { + socket.send("hello world"); + } You should see an alert come back immediately saying "hello world" - your message has round-tripped through the server and come back to trigger the alert.