From bf61aec1e1c90a639fb7b5cb37a777b28add43a4 Mon Sep 17 00:00:00 2001 From: Luc MULLER Date: Thu, 29 Jul 2021 11:48:44 +0200 Subject: [PATCH] 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 --- tarteaucitron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tarteaucitron.js b/tarteaucitron.js index 0604979..40493e7 100644 --- a/tarteaucitron.js +++ b/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);