I recently discovered and wrote about monitoring javascript functions in the console using monitor() – very handy and well worth a read if you’re interested in these kind of things.
Whilst I was at it, I also re-discovered monitorEvents(), which I’d completely forgotten about. This works by letting you actually monitor the event itself, rather than the event handler function, like this…
The first line is me setting up the monitoring…
monitorEvents(window,"click");
I’ve then clicked on the page 3 times and each click event was logged to the console for me, as an object with all of the properties available to expand and inspect.
This can be super handy, so well worth remembering (mental note made).