소스 검색

🐛 Dispatch an event when a service is accepted

PR #363 introduced an event to detect when a service is accepted.
This is only dispatched when the page is loaded with the service
already accepted.

This commit ensures its also dispatched when the user click the
Allow button in the service engagement placeholder.
nstCactus 5 년 전
부모
커밋
f5df8620cc
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      tarteaucitron.js

+ 1 - 0
tarteaucitron.js

@@ -748,6 +748,7 @@ var tarteaucitron = {
                     tarteaucitron.pro('!' + key + '=engage');
 
                     tarteaucitron.launch[key] = true;
+                    tarteaucitron.sendEvent(key + '_loaded');
                     tarteaucitron.services[key].js();
                 }
             }