fixing eventsource.js for IE8

This commit is contained in:
Thomas Mueller 2013-02-14 12:17:14 +01:00
parent 8877087b57
commit 8065c73339
1 changed files with 7 additions and 3 deletions

View File

@ -87,9 +87,11 @@ OC.EventSource.prototype={
useFallBack:false,
fallBackCallBack:function(type,data){
if(type){
if (typeof this.listeners['done'] != 'undefined') {
for(var i=0;i<this.listeners[type].length;i++){
this.listeners[type][i](data);
}
}
}else{
for(var i=0;i<this.typelessListeners.length;i++){
this.typelessListeners[i](data);
@ -117,6 +119,8 @@ OC.EventSource.prototype={
}
},
close:function(){
if (typeof this.source !='undefined') {
this.source.close();
}
}
}