[Debug] Debug and inspect event listeners with Devtools

You can use getEventListeners(button)directly inside chrome devtool, but not inside application code.

 

You can use monitorEvents(button, 'keydown'), now every times keydown happens, event will be logged into the console.

Use unmonitorEvents(button, 'keydown')to stop.

 

posted @ 2023-06-02 20:51  Zhentiw  阅读(5)  评论(0编辑  收藏  举报