Read more

Chrome DevTools: List Registered Event Listeners

Julian
March 14, 2022Software engineer at makandra GmbH

In Chrome DevTools you can use getEventListeners(object) to get a list of registered event listeners on the specified object.

Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

You can also do this without the console, by selecting an element in the DOM inspector. In the element details, select the tab Event Listeners".

Example

const registry = getEventListeners(document)

registry['up-click']
// 0: { useCapture: false, passive: false, once: false, type: 'up:click', listener: ƒ }
// 1: { useCapture: false, passive: false, once: false, type: 'up:click', listener: ƒ }
// ...
// length: n
Posted by Julian to makandra dev (2022-03-14 11:14)