0

We need to find all the events attached to a particular DOM element. For example, how can I find all the events attached to the YouTube search input tag? I have tried:

$._data( $("#tabieBrowser")[0], "events" );

It works on some website but mostly it doesn't. I have also tried to include jQuery if the website doesn't have it.

var script = document.createElement('script');
script.src = '//code.jquery.com/jquery-1.11.0.min.js';
document.getElementsByTagName('head')[0].appendChild(script);
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

1 Answers1

1

On Chrome only, you can use getEventListeners(element) to find all active event listeners and the events they are listening for.

Marisha
  • 186
  • 13