Ver Fonte

fix: events.load really at the end (inside setTimeout)

events.load must be execute inside the setTimeout before script realy fully loaded
lioshi há 4 anos atrás
pai
commit
e8d1b37b82
1 ficheiros alterados com 4 adições e 5 exclusões
  1. 4 5
      tarteaucitron.js

+ 4 - 5
tarteaucitron.js

@@ -662,14 +662,13 @@ var tarteaucitron = {
                             tarteaucitron.userInterface.respond(this, false);
                         });
                     }
+                    if(tarteaucitron.events.load) {
+                        tarteaucitron.events.load();
+                    }
                 }, 500);
                 
             });
         });
-
-        if(tarteaucitron.events.load) {
-            tarteaucitron.events.load();
-        }
     },
     "addService": function (serviceId) {
         "use strict";
@@ -1844,4 +1843,4 @@ var tarteaucitron = {
             });
         }
     }
-};
+};