Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.
Monitor all events dispatched on an element
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.
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