Firefox extension to find out which Javascript event is bound to an inspected element?

不羁的心 提交于 2019-11-29 20:49:13
NVI

Visual event 2


(source: tinygrab.com)

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

Nickolay

There's no way to enumerate listeners added with addEventListener in Firefox core (bug 448602).

There may be workarounds, but I'm not aware of any. See also How to find event listeners on a DOM node when debugging or from the JavaScript code?

[edit] Oh wait, determine "which events are bound"? Did you mean which events can fire on the node? If so, you should clarify your question.

From Firefox 33 this feature is added to inspector in . You can see 'ev' or 'event' icon next to elements which have event listeners. Clicking that displays a listing of all the event listeners bound to the element.

MDN - Examine Event Listeners

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!