You can use the monitorEvents
global function in the Console panel to log all of the events dispatched on a particular element.
- Select an element in the Elements panel.
- Go to the Console.
- Type
monitorEvents($0, 'key');
and hit Enter. - Interact with the selected element in the page to dispatch events.
You can replace $0
with a reference to any other element. $0
is just a shortcut to the currently selected element.
You can also change key
to other event types like mouse
.
Thank you to Minko Gechev for tweeting about this tip.