Mercurial > eldonilo > lightstring
diff lightstring.js @ 40:e02bfcb78428
priority to WebSocket
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Tue, 31 Jan 2012 15:25:30 +0100 |
parents | 5e32481b8a92 |
children | 2895891f19bb |
line wrap: on
line diff
--- a/lightstring.js +++ b/lightstring.js @@ -265,13 +265,12 @@ Lightstring.Connection.prototype = { if (!this.service) throw 'Lightstring: Connection.service is undefined.'; - //"Bug 695635 - tracking bug: unprefix WebSockets" https://bugzil.la/695635 - if(typeof(MozWebSocket) == "function") { + if(typeof(WebSocket) === "function") { + this.socket = new WebSocket(this.service, 'xmpp'); + } + else if(typeof(MozWebSocket) === "function") { this.socket = new MozWebSocket(this.service, 'xmpp'); } - else if(typeof(WebSocket) == "function") { - this.socket = new WebSocket(this.service, 'xmpp'); - } else { throw new Error('WebSocket not available.'); }