How to find event listeners on a DOM node using JavaScript

前端 未结 4 1343
梦谈多话
梦谈多话 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条回答
  •  Happy的楠姐
    2020-12-29 06:07

    use the following function to fetch the json of registered events;

    getEventListeners(node_name); where node_name can be an element name or its id.

提交回复
热议问题