如何看到什么确切事件绑定到DOM元素? [英] How to see what exact events are bound to DOM elements?
问题描述
我觉得我想经常这样做,但不能因为我无法访问实际的事件。
例如(这只是一个例如,我可以只是看看API)我试图看看stackoverflow的图像上传器是如何工作的,但是当我调用 $($ 0).data('events)
(或 $('form [action =/ upload / image]:submit')。data('events')
)我得到未定义
。有没有其他方法来查看某些事件的实际功能?
如果是,还有一种方法可以在这些事件上设置断点?
编辑:
使用 Visual Event
这是我看到的p>
个人而言,我使用的是Firebug和视觉事件。
编辑:事件亮点并不总是完美排列,因为定位。
我设法在这里找到图像提交功能:
I feel I want to do this often but can't because I don't have access to the actual events.
For example (and this is just an example as I can just look at the API instead) I was trying to see how stackoverflow's image uploader works, but when I call $($0).data('events)
(or $('form[action="/upload/image"] :submit').data('events')
) I get undefined
. Is there any other way to look at the actual functions of certain events?
If so, is there also a way to set breakpoints on those events?
EDIT:
Using Visual Event
this is what I see
Personally, I use a mix of Firebug and Visual Event.
EDIT: The event highlights don't always line up perfectly due to positioning.
I managed to find the image submit function here:
这篇关于如何看到什么确切事件绑定到DOM元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!