Chrome DevTools: Show the function definition of registered event listeners on any elementLast updated: 19th July 2020
click handler registered with
DevTools can also take you to the exact line of code where the event is registered, which makes it useful when debugging from the outside in.
How to use this feature
- Inspect an element in the Elements Panel
- Navigate to the Event Listeners Pane in the Elements Panel
- Browse the events registered on any node. You can view the source of an event listener by selecting Show Function Definition in the context menu
As a heads-up, browser extensions often apply event listeners to elements in the page, so you may see code from other sources when browsing the Event Listeners Pane.