I have global variable, let's call it jsEvents
which serves as dispatcher for all events in project. There are about 200 listeners and about the same quantity of custom events, such as
$(jsEvents).on('customEvent', function(){
//doing something
})
Now I want to investigate what exactly is going on between one event and another event. So I want to log every event at the time it occurs, so I could check if the sequence is correct.
One way is write console.log
in every event listener, but may be it's possible to listen any
event? And typeout it's name?
Something like
$(jsEvents).on('*', function(){
//here I want to console.log event's name
})