14

I'm using Firefox. Is there something out there that will show me all the JavaScript events that are getting triggered in real time?

2
  • Such a listing would be polluted with a million mouse events that you probably don't care about. Commented Nov 3, 2010 at 17:00
  • @mikerobi normally no i would not care. But I need to debug some event issues where they are firing in different orders. Therefore I do need to see them all in this case. Commented Nov 3, 2010 at 17:05

2 Answers 2

15

You can right-click an element in Firebug's HTML tab and click Log Events.

You will then see every event received by that element in the Console tab.
You can even click one of them to explore the properties of the event object.

Sign up to request clarification or add additional context in comments.

2 Comments

That's a great tip, but... Unfortunately, the 'Log Events' setting does not 'stick' to that element, which makes it impossible to log events that happen while (or directly after) the page is loading. Does anyone know a way log those events as well?
@marcvangend: Set a Javascript breakpoint somewhere that will trigger before the events fire, then click Log events.
3

I have been using Visual Event for a few years now. It's a simple bookmarklet, meaning you just have to drag it into your bookmarks, and then click it while on your page to visually highlight all javascript events. You can also trigger the events at will, and probably a whole lot more. It's very easy and intuitive to use, and perfect to quickly find what you're looking for. Give it a try:

https://github.com/DataTables/VisualEvent

1 Comment

Two different versions of Visual Event exist. I always keep both of them in the bookmark: v1, v2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.