Skip to content
Browse files

comment on a IE8 bug

	modified:   easyWebSocket-node.min.js
	modified:   easyWebSocket.min.js
	modified:   node/easyWebSocket-node.js
  • Loading branch information...
1 parent e0d9d72 commit ca3b4fc54629d142cab4f569ac2dfd9f48aef826 @jeromeetienne committed Feb 28, 2011
Showing with 3 additions and 2 deletions.
  1. +1 −1 easyWebSocket-node.min.js
  2. +1 −1 easyWebSocket.min.js
  3. +1 −0 node/easyWebSocket-node.js
View
2 easyWebSocket-node.min.js
@@ -103,6 +103,6 @@ function(c,e){return function(g){var l=new a;l.initEvent(e,true,true);l.target=l
for(var g=0;g<WebSocket.__tasks.length;++g)WebSocket.__tasks[g]();WebSocket.__tasks=[]}catch(l){b.error("[WebSocket] "+l.toString())}})}else b.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf")};WebSocket.__addTask=function(c){WebSocket.__flash?c():WebSocket.__tasks.push(c)};WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return false;var c=window.navigator.mimeTypes["application/x-shockwave-flash"];if(!c||!c.enabledPlugin||!c.enabledPlugin.filename)return false;
return c.enabledPlugin.filename.match(/flashlite/i)?true:false};window.webSocketLog=function(c){b.log(decodeURIComponent(c))};window.webSocketError=function(c){b.error(decodeURIComponent(c))};window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",WebSocket.__initialize,false):window.attachEvent("onload",WebSocket.__initialize))}else b.error("Flash Player is not installed.")}})();EasyWebSocket=function(a){var b=this;this.url=a;this.bufferedAmount=0;this.readyState=EasyWebSocket.CONNECTING;this._clientId="clientid-sio-"+this.url+"-"+Math.floor(Math.random()*999999).toString(36);this.log=EasyWebSocket.logFunction;this.onopen=function(){b.log("default onopen method")};this.onmessage=function(){b.log("default onmessage method")};this.onerror=function(){b.log("default onerror method")};this.onclose=function(){b.log("default onclose method")};this._sioCtor()};
EasyWebSocket.prototype._sioCtor=function(){var a=this,b=this.parseUri(EasyWebSocket.serverUrl),c=b.host;b=parseInt(b.port);this._sockio=new io.Socket(c,{port:b,rememberTransport:false});this._sockio.connect();this._sockio.on("connect",function(){a.log("socket connected",a._sockio,a._clientId);a._sockio.send({type:"connect",data:{wsUrl:a.url,clientId:a._clientId}});a.readyState=EasyWebSocket.CONNECTED;a.onopen()});this._sockio.on("connect_failed",function(){a.onerror()});this._sockio.on("message",
-function(e){a.log("received message",e);a.onmessage({data:e})});this._sockio.on("disconnect",function(){console.log("socket disconnected");a.onclose()})};EasyWebSocket.prototype.send=function(a){this._sockio.send({type:"message",data:{clientId:this._clientId,message:a}})};EasyWebSocket.prototype.close=function(){this._sockio.disconnect()};EasyWebSocket.CONNECTING=0;EasyWebSocket.OPEN=1;EasyWebSocket.CLOSING=2;EasyWebSocket.CLOSED=3;EasyWebSocket.serverUrl="http://88.191.76.230:8667";
+function(e){a.log("received message",e);a.onmessage({data:e})});this._sockio.on("disconnect",function(){a.log("socket disconnected");a.onclose()})};EasyWebSocket.prototype.send=function(a){this._sockio.send({type:"message",data:{clientId:this._clientId,message:a}})};EasyWebSocket.prototype.close=function(){this._sockio.disconnect()};EasyWebSocket.CONNECTING=0;EasyWebSocket.OPEN=1;EasyWebSocket.CLOSING=2;EasyWebSocket.CLOSED=3;EasyWebSocket.serverUrl="http://88.191.76.230:8667";
EasyWebSocket.logFunction=function(){};EasyWebSocket.prototype.parseUri=function a(b){var c=a.options;b=c.parser[c.strictMode?"strict":"loose"].exec(b);for(var e={},g=14;g--;)e[c.key[g]]=b[g]||"";e[c.q.name]={};e[c.key[12]].replace(c.q.parser,function(l,q,o){if(q)e[c.q.name][q]=o});return e};
EasyWebSocket.prototype.parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
View
2 easyWebSocket.min.js
@@ -103,6 +103,6 @@ function(c,e){return function(g){var l=new a;l.initEvent(e,true,true);l.target=l
for(var g=0;g<WebSocket.__tasks.length;++g)WebSocket.__tasks[g]();WebSocket.__tasks=[]}catch(l){b.error("[WebSocket] "+l.toString())}})}else b.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf")};WebSocket.__addTask=function(c){WebSocket.__flash?c():WebSocket.__tasks.push(c)};WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return false;var c=window.navigator.mimeTypes["application/x-shockwave-flash"];if(!c||!c.enabledPlugin||!c.enabledPlugin.filename)return false;
return c.enabledPlugin.filename.match(/flashlite/i)?true:false};window.webSocketLog=function(c){b.log(decodeURIComponent(c))};window.webSocketError=function(c){b.error(decodeURIComponent(c))};window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",WebSocket.__initialize,false):window.attachEvent("onload",WebSocket.__initialize))}else b.error("Flash Player is not installed.")}})();EasyWebSocket=function(a){var b=this;this.url=a;this.bufferedAmount=0;this.readyState=EasyWebSocket.CONNECTING;this._clientId="clientid-sio-"+this.url+"-"+Math.floor(Math.random()*999999).toString(36);this.log=EasyWebSocket.logFunction;this.onopen=function(){b.log("default onopen method")};this.onmessage=function(){b.log("default onmessage method")};this.onerror=function(){b.log("default onerror method")};this.onclose=function(){b.log("default onclose method")};this._sioCtor()};
EasyWebSocket.prototype._sioCtor=function(){var a=this,b=this.parseUri(EasyWebSocket.serverUrl),c=b.host;b=parseInt(b.port);this._sockio=new io.Socket(c,{port:b,rememberTransport:false});this._sockio.connect();this._sockio.on("connect",function(){a.log("socket connected",a._sockio,a._clientId);a._sockio.send({type:"connect",data:{wsUrl:a.url,clientId:a._clientId}});a.readyState=EasyWebSocket.CONNECTED;a.onopen()});this._sockio.on("connect_failed",function(){a.onerror()});this._sockio.on("message",
-function(e){a.log("received message",e);a.onmessage({data:e})});this._sockio.on("disconnect",function(){console.log("socket disconnected");a.onclose()})};EasyWebSocket.prototype.send=function(a){this._sockio.send({type:"message",data:{clientId:this._clientId,message:a}})};EasyWebSocket.prototype.close=function(){this._sockio.disconnect()};EasyWebSocket.CONNECTING=0;EasyWebSocket.OPEN=1;EasyWebSocket.CLOSING=2;EasyWebSocket.CLOSED=3;EasyWebSocket.serverUrl="http://88.191.76.230:8667";
+function(e){a.log("received message",e);a.onmessage({data:e})});this._sockio.on("disconnect",function(){a.log("socket disconnected");a.onclose()})};EasyWebSocket.prototype.send=function(a){this._sockio.send({type:"message",data:{clientId:this._clientId,message:a}})};EasyWebSocket.prototype.close=function(){this._sockio.disconnect()};EasyWebSocket.CONNECTING=0;EasyWebSocket.OPEN=1;EasyWebSocket.CLOSING=2;EasyWebSocket.CLOSED=3;EasyWebSocket.serverUrl="http://88.191.76.230:8667";
EasyWebSocket.logFunction=function(){};EasyWebSocket.prototype.parseUri=function a(b){var c=a.options;b=c.parser[c.strictMode?"strict":"loose"].exec(b);for(var e={},g=14;g--;)e[c.key[g]]=b[g]||"";e[c.q.name]={};e[c.key[12]].replace(c.q.parser,function(l,q,o){if(q)e[c.q.name][q]=o});return e};
EasyWebSocket.prototype.parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
View
1 node/easyWebSocket-node.js
@@ -147,6 +147,7 @@ EasyWebSocket.logFunction = function(){}
EasyWebSocket.prototype.parseUri = function parseUri (str) {
var o = parseUri.options,
+ // TODO apparently this o.parser is causing trouble in IE8
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
uri = {},
i = 14;

0 comments on commit ca3b4fc

Please sign in to comment.
Something went wrong with that request. Please try again.