title: Unable to close WebSocket with JavaScript
body: <p>I am trying to close my websocket via:</p>
  
  <pre><code>socket.close();
  </code></pre>
  
  <p>However I get the error on Safari 5.0.4:</p>
  
  <pre><code>TypeError: Result of expression 'socket.close' [undefined] is not a function.
  </code></pre>
  
  <p>How can I properly close my web socket?</p>