Explorar o código

Merge pull request #768 from lucmuller/master

Event loaded should be sent after js script is executed
Amauri CHAMPEAUX %!s(int64=3) %!d(string=hai) anos
pai
achega
6bfab4df0b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      tarteaucitron.js

+ 1 - 1
tarteaucitron.js

@@ -1004,8 +1004,8 @@ var tarteaucitron = {
                     tarteaucitron.pro('!' + key + '=engage');
 
                     tarteaucitron.launch[key] = true;
-                    tarteaucitron.sendEvent(key + '_loaded');
                     if (typeof tarteaucitronMagic === 'undefined' || tarteaucitronMagic.indexOf("_" + key + "_") < 0) { tarteaucitron.services[key].js(); }
+                    tarteaucitron.sendEvent(key + '_loaded');
                 }
             }
             var itemStatusElem = document.getElementById('tacCurrentStatus'+key);