Sfoglia il codice sorgente

Give time window to execute the script.

Packages can load in bad order when loaded using jQuery.
The callback is upon load, not upon execution.
This gives a 5ms time window for the actual execution for each .js file.
Herbert Vojčík 12 anni fa
parent
commit
308362f3f5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      js/amber.js

+ 1 - 1
js/amber.js

@@ -247,7 +247,7 @@ amber = (function() {
 			dataType: "script",
 			url: url,
 			cache: deploy,
-			success: callback
+            success: function () { setTimeout(callback, 5); }
 		});
 	}