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 money motivation

Opscomplete powered by makandra brand

Save money by migrating from AWS to our fully managed hosting in Germany.

  • Trusted by over 100 customers
  • Ready to use with Ruby, Node.js, PHP
  • Proactive management by operations experts
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)