</h1> <p> <form action="#" onsubmit="doConnect(); return false;"> <input type="text" id="url" value="ws://html5rocks.websocket.org/echo?encoding=text" /> <input type="submit" value="Connect" /> </form> <form action="#" onsubmit="doSend(); return false;"> <input type="text" id="message" value="hello" /> <input type="submit" value="Send" /> </form> <form action="#" onsubmit="doClose(); return false;"> <input type="submit" value="Close" /> </form> <textarea id="log" rows="10" cols="80"></textarea> <div id="listener"> <script type="text/javascript"> var listener = document.getElementById('listener') listener.addEventListener('load', moduleDidLoad, true); listener.addEventListener('message', handleMessage, true); </script> <embed name="nacl_module" id="websocket" width=0 height=0 src="<tc>/websocket.nmf" type="application/x-nacl" /> </div> </p> <p>Set a server URL, then push "Connect" button to establish a connection.</p> <p>"Send" button sends text message on the left text area.</p> <p>"Close" button closes the connection/</p> <h2>Status</h2> <div id="statusField">NO-STATUS</div> </body> </html>