«   Previous tip Next tip   »

Chrome DevTools: Get and debug event listeners of any element

Last updated: 26th July 2020
Get and debug event listeners of any element

Introduction

In DevTools, you can programmatically get the event listeners for any element.

How to use this feature

You can use getEventListeners(element) in the Console Panel to retrieve registered event listeners of the specified element.

In addition to that, the video clip shows debug(fn) invoking the debugger when fn is called.

Extra

There's actually a built-in Event Listeners Pane within the Elements Panel.

«   Previous tip Next tip   »

Sign up to receive a developer tip, in the form of a gif, in your inbox each week