Demo for the monitorEvents() Feature in Chromium-based DevTools

Enter the following line in the DevTools console:

monitorEvents(document.querySelector('button'), 'click');

Then, with the console still open, click the first button. The event object will be logged, with the option to inspect it.

This will continue until you use the unmonitorEvents() method, passing in the targeted object:

unmonitorEvents(document.querySelector('button'));

Here are some others you can try, after which you can trigger the event and again see the logs in the console:

monitorEvents(window.btn2, 'mouseover');
monitorEvents(window, 'resize');
monitorEvents(document.body, 'contextmenu');