Forgot parameters to Get()
Cette révision appartient à :
Parent
133947df0a
révision
b546e6b1d3
1 fichiers modifiés avec 1 ajouts et 2 suppressions
|
@ -3,7 +3,6 @@ var Query = {
|
|||
MaxConsecutingFailing:-1,
|
||||
Get: function(url, renderer, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
console.log(url)
|
||||
xhr.open('GET', url, true);
|
||||
xhr.responseType = 'json';
|
||||
xhr.onload = function(e) {
|
||||
|
@ -15,7 +14,7 @@ var Query = {
|
|||
console.log("Error when refresh")
|
||||
Query.Failed++;
|
||||
console.log("Attempt to refresh "+Query.Failed+"...");
|
||||
if ((Query.MaxConsecutingFailing == -1) || (Query.Failed < Query.MaxConsecutingFailing)) Query.Get();
|
||||
if ((Query.MaxConsecutingFailing == -1) || (Query.Failed < Query.MaxConsecutingFailing)) Query.Get(url, renderer, callback);
|
||||
else console.error("Too many attempts, stopping...")
|
||||
}
|
||||
};
|
||||
|
|
Référencer dans un nouveau ticket