How to find event listeners on a DOM node using JavaScript

前端 未结 4 1341
梦谈多话
梦谈多话 2020-12-29 05:18

I still can\'t belive this is not possible but is there a way to loop through the dom and see all event handlers attached using \'addEventListener\'. This post and many othe

4条回答
  •  既然无缘
    2020-12-29 05:57

    Of course browsers internally have a list of event listeners, but it is not exposed to page-level JavaScript. For example, Firebug (or Eventbug) probably use nsIEventListenerInfo.

    That being said, this old answer still holds:
    How to find event listeners on a DOM node?

提交回复
热议问题