How Eventbug actually works

♀尐吖头ヾ 提交于 2019-12-03 12:27:59

问题


Eventbug is a add-on for firebug (yes, add-on for add-on), which is aimed to track all events assigned to DOM elements.

The question is - how it actually works? Since, generally speaking, there is no way, at least as far as I know, to get the list of attached events in W3C event model.

Can somebody who already explored this issue tell me something about the basic idea underneath. Is it redefining addEventListener in global scope or something?


回答1:


It is using nsIEventListenerService which is an internal API available to Firefox add-ons. In fact, it has been introduced specifically for Firebug, see bug 448602.



来源:https://stackoverflow.com/questions/7254832/how-eventbug-actually-works

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