如何跟踪或调试所有可用的 JavaScript 事件 [英] How to trace or debug all available javascript events

查看:21
本文介绍了如何跟踪或调试所有可用的 JavaScript 事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何跟踪网页的所有 Javascript 事件?

How can I trace all Javascript events of a web page?

是否有可能跟踪所有事件,即使没有附加处理程序?

Is there a possibility to trace all events, even such without a handler attached?

是否有任何工具可以做到这一点?

Is there any tool out there, that can do this?

澄清:

例如:

对于文本输入,我可以为 onbluronchange 添加事件处理程序.

For a text input I can add an event handler for onblur and onchange.

如果我(在浏览器中)更改文本字段的值并保留它,则两个事件处理程序都会执行.现在我想知道我错过了"哪些其他活动?(如果附加了事件处理程序就会被执行的那些).

If I (in the browser) change the value of the textfield and leave it, both eventhandlers are executed. Now I would like to know which other events I "have missed" (the ones which would have been executed if there was an eventhandler attached).

澄清2:

我可以获得一个列表(在给定元素上)我可以附加事件处理程序的所有可能事件吗?

Can I get a list(on a given element) of all possible events I can attach an eventhandler?

推荐答案

这里是 Javascript 事件列表:https://developer.mozilla.org/en-US/docs/Web/活动

Here is a list of Javascript events: https://developer.mozilla.org/en-US/docs/Web/Events

这篇关于如何跟踪或调试所有可用的 JavaScript 事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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