0

Let's say I have this simple rendered div element in browser:

<div class="contact">
   <!-- info here -->
</div>

And I don't have access to the source code of Angular. Is there a way to find out what event listeners are attached to div.contact element?

  • There's no way in JS you can get an event listener bound to an HTMLElement, so I'd say no. Plus, the code of your app is compiled, meaning your functions will be called `a` or `b`, which won't tell you what method is ran. –  Jul 27 '18 at 12:22
  • 1
    You can examine event listeners when debugging, but I don't think you can get the listeners programmatically. https://developers.google.com/web/tools/chrome-devtools/console/events#view_event_listeners_registered_on_dom_elements – Explosion Pills Jul 27 '18 at 12:37
  • In jQuery in the old days we had [such capability](https://stackoverflow.com/questions/2518421/jquery-find-events-handlers-registered-with-an-object) – mohammad rostami siahgeli Jul 27 '18 at 13:04

0 Answers0