Querying the list of event listeners registered for a given event type

Is there a way to identify the list of registered listeners for a given event in javascript, if so can you please list out the sample?

Answers:

Answer

Not in general. You can only do this if you keep track of all event listeners yourself in your code. The simplest way would be to use a wrapper function for all your event listener assignment. I wouldn't be surprised if one of the big libraries does this for you.

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.