Chrome开发工具:查看页面中使用的所有事件监听器 [英] Chrome Dev Tools : view all event listeners used in the page
问题描述
是否有chrome开发工具(或任何扩展)中的功能,通过它我可以查看某个页面/应用程序中使用的所有事件侦听器。
上面的问题解释了如何查找在与我们的应用进行交互时被触发的特定事件(我意识到如何做到这一点!)。
我要找的 是我们在应用中侦听的所有事件的列表,以及它们附加到哪些DOM元素。
$ b $ b
这个库似乎涵盖了这个: https://blinkingcaret.wordpress.com/2014/01/17/quickly-finding - 和 - 调试 - jQuery的事件处理程序/
查找使用jQuery注册的事件处理程序可能会非常棘手。 findHandlersJS可以很容易地找到它们,你需要的只是事件类型和事件可能发生元素的jQuery选择器。
Is there a feature in chrome dev tools(or any extension) by which I can view all the event listeners that are used on a certain page/app.
Edit:
Its certainly not a duplicate of this question : How do I view events fired on an element in Chrome DevTools?
The above question explains how to look for a particular event that gets fired when we interact with our app ( I am aware of how to do that!).
What I am looking for is the List of all the events that we are listening to in the app and which DOM elements they are attached to.
Chrome Dev-Tools don't properly show jQuery-added event-listeners.
This library seems to cover this: https://blinkingcaret.wordpress.com/2014/01/17/quickly-finding-and-debugging-jquery-event-handlers/
Finding event handlers registered using jQuery can be tricky. findHandlersJS makes finding them easy, all you need is the event type and a jQuery selector for the elements where the events might originate.
这篇关于Chrome开发工具:查看页面中使用的所有事件监听器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!