A fancy method to debug JS events, and log all or some of them.
simply call the monitorEvents() function in your JS console, and you will see the events flow.
monitorEvents(document.getElementById('monitor-me'), 'click');
the first argument is the object to monitor, and the second argument is the optional filter. for example – show only click events.
to unbind the listener, you can use unmonitorEvents(document.getElementById(‘monitor-me’))