A page is filled to the brim with marketing scripts. Like quizes, online chats, CRM etc. There are a lot of events fired: a dialog in the chat started, a chat is submitted, a form in iframe is submitted etc.
Just CRM fires a lot of events. To read the documentation in search for the necessary event is a tedious procedure. It is Ok for me, but for now I'd like to catch any event in the document and print it to the console.
It is both for learning purposes and for self control.
I'd like to have something that can catch any event in the document. And then I'd be able to print it to the console log. Something like this:
document.addEventListener(function(event){console.log(event);}
Here 'event' means any event at all.
When I visually see this events and compare them with what I see in the screen, I'll better and quicker study the APIs of those marketing libs.