Explorar o código

forked initialization, optically faster load (dom-ready happens sooner)

Herbert Vojčík %!s(int64=12) %!d(string=hai) anos
pai
achega
c3b6e187c0
Modificáronse 1 ficheiros con 7 adicións e 5 borrados
  1. 7 5
      js/init.js

+ 7 - 5
js/init.js

@@ -1,7 +1,9 @@
-smalltalk.initialize();
+setTimeout(function () {
+    smalltalk.initialize();
 
-/* Similar to jQuery(document).ready() */
+    /* Similar to jQuery(document).ready() */
 
-if(this.amber && this.amber.smalltalkReady) {
-	this.amber.smalltalkReady();
-}
+    if (this.amber && this.amber.smalltalkReady) {
+        this.amber.smalltalkReady();
+    }
+}, 0);