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 online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)