SockJS can be instantiated with just a URL

see: https://github.com/sockjs/sockjs-client

example copied from their README:
```
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');
};

sock.send('test');
sock.close();
```
This commit is contained in:
matt
2014-11-22 15:39:54 -08:00
parent 1f36499d22
commit 490f118b57
+1 -1
View File
@@ -36,7 +36,7 @@ interface SockJS extends EventTarget {
declare var SockJS: {
prototype: SockJS;
new (url: string, _reserved: any, options?: {
new (url: string, _reserved?: any, options?: {
debug?: boolean;
devel?: boolean;
protocols_whitelist?: string[];