How to find event listeners on a DOM node when debugging or from the JavaScript code?

前端 未结 19 2832
臣服心动
臣服心动 2020-11-21 05:34

I have a page where some event listeners are attached to input boxes and select boxes. Is there a way to find out which event listeners are observing a particular DOM node a

19条回答
  •  没有蜡笔的小新
    2020-11-21 06:13

    WebKit Inspector in Chrome or Safari browsers now does this. It will display the event listeners for a DOM element when you select it in the Elements pane.

提交回复
热议问题