common.js
@@ -45,7 +45,9 @@ Deferred.all = function(iterable) { return new Deferred( Promise.all( iterable.map(x => x.promise) iterable.map(function(x) { return x.promise; }) ) ); }; @@ -57,6 +59,7 @@ var self = this; var request = new XMLHttpRequest(); var promise = new Promise(function(resolve, reject) { request.open('GET', url, true); request.timeout = self.timeout; request.onreadystatechange = function() { if(this.readyState == 4) { @@ -71,7 +74,6 @@ } } }; request.open('GET', url, true); request.send(); }); return new Deferred(promise, request);