Firefox扩展找出哪个Javascript事件绑定到一个被检查的元素? [英] Firefox extension to find out which Javascript event is bound to an inspected element?

查看:135
本文介绍了Firefox扩展找出哪个Javascript事件绑定到一个被检查的元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有办法在检查html元素时知道哪些事件绑定到了元素上?
我想知道由开发人员定义的事件,而不是浏览器附带的内部事件。

所以如果我把鼠标悬停在一个元素上,菜单显示出来,我想知道哪个方法导致了它。



我一直在使用代码检查器尝试事件间谍,但它记录了太多的内部的,除非我我没有正确使用它。

解决方案

视觉事件2



视觉事件http://new.tinygrab.com/2c76fd8c3ea0ac6d22b28e3d46d6c480.png
$ b


Visual Event是一个开放源代码的Javascript小书签,它提供了关于已经附加到DOM元素的事件的调试信息。


One can bind Javascript events to html elements without using inline declarations.

Is there a way when inspecting an html element to know which events are bound to the element? I want to know about the events defined by the developer and not the internal ones that come with the browser.

So if I hover over an element and a menu shows up, I want to know which method caused it.

I have been trying Event Spy with the Code inspector but it logs too many of the internal ones, unless I am not using it right.

解决方案

Visual event 2

Visual event http://new.tinygrab.com/2c76fd8c3ea0ac6d22b28e3d46d6c480.png

Visual Event is an open source Javascript bookmarklet which provides debugging information about events that have been attached to DOM elements.

这篇关于Firefox扩展找出哪个Javascript事件绑定到一个被检查的元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆