From 26db4d8d61a24893fed2d7af6ce89192cb694205 Mon Sep 17 00:00:00 2001 From: Hossein-Fasihi Date: Wed, 24 Apr 2019 14:56:23 +0430 Subject: [PATCH] Change `window` To `self` Because when using `window` only web pages can use this. But when using `self`, then web workers can use it too. --- resumable.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resumable.js b/resumable.js index cba0ed4a..2ca2b0ee 100644 --- a/resumable.js +++ b/resumable.js @@ -390,7 +390,7 @@ // no succeeded files, just skip return; } - window.setTimeout(function(){ + self.setTimeout(function(){ $.fire('filesAdded', files, filesSkipped); },0); } @@ -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 { @@ -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