Define and set up event handlers through the event ‘addHandler’ methods (optional)

Example Events Snippet:

<script>

 //locally defined handlers
 function loginHandler(user) {
 console.log("LOGIN HANDLER");
 console.log(user);
 } 

 function AEJSReady(aeJS) {
 //attach local handlers to events
 aeJS.events.onFlow.addHandler(flowHandler);
 aeJS.events.onLogin.addHandler(loginHandler);
 aeJS.events.onWindow.addHandler(windowHandler);
 }
 </script> 

Did this answer your question?