Преглед изворни кода

Event loaded should be sent after js script is executed in order to be able to manipulate result of the script after loaded event is sent

Luc MULLER пре 3 година
родитељ
комит
bf61aec1e1
1 измењених фајлова са 1 додато и 1 уклоњено
  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);