Ver código fonte

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 anos atrás
pai
commit
308362f3f5
1 arquivos alterados com 1 adições e 1 exclusões
  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); }
 		});
 	}