Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions resumable.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
// no succeeded files, just skip
return;
}
window.setTimeout(function(){
self.setTimeout(function(){
$.fire('filesAdded', files, filesSkipped);
},0);
}
Expand Down Expand Up @@ -440,7 +440,7 @@
$.files.push(f);
files.push(f);
f.container = (typeof event != 'undefined' ? event.srcElement : null);
window.setTimeout(function(){
self.setTimeout(function(){
$.fire('fileAdded', f, event)
},0);
})()} else {
Expand Down Expand Up @@ -559,12 +559,12 @@
var round = $.getOpt('forceChunkSize') ? Math.ceil : Math.floor;
var maxOffset = Math.max(round($.file.size/$.getOpt('chunkSize')),1);
for (var offset=0; offset<maxOffset; offset++) {(function(offset){
window.setTimeout(function(){
self.setTimeout(function(){
$.chunks.push(new ResumableChunk($.resumableObj, $, offset, chunkEvent));
$.resumableObj.fire('chunkingProgress',$,offset/maxOffset);
},0);
})(offset)}
window.setTimeout(function(){
self.setTimeout(function(){
$.resumableObj.fire('chunkingComplete',$);
},0);
};
Expand Down Expand Up @@ -1165,8 +1165,8 @@
return Resumable;
});
} else {
// Browser: Expose to window
window.Resumable = Resumable;
// Browser: Expose to window or worker
self.Resumable = Resumable;
}

})();