title: javascript websocket on node and in pure javascript
body: <p>I receive example how to call websocket by node.js:</p>
  <pre><code>            const wss = new WebSocket('wss://tra_la_la', '', {
              headers: {
                  Authorization: 'CODE &amp;lt;' + access_code + '&amp;gt;'
              }
          });
          wss.on('message', function incoming(data) {
              console.log(data);
          });
  </code></pre>
  <p>but I can't repeat it in pure javascript because of &quot;Uncaught DOMException:
  Failed to construct 'WebSocket': The subprotocol '' is invalid.&quot; error.
  I can not to find this error description in manual or documentation, so
  could anybody tell me how to do it properly? What is the difference betwen node.js javascript and normal javascript in case of websocket?</p>