# HG changeset patch # User Sonny Piers # Date 1328019930 -3600 # Node ID e02bfcb78428c73f722457dd371aea737ff510c0 # Parent 5e32481b8a92c6222269cf92cfa668b49b3be887 priority to WebSocket diff --git a/lightstring.js b/lightstring.js --- 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.'); }