We have made a great further progress with John J. Barton on a new extension for Firebug called Eventbug. Big thanks to Olli Pettay (smaug) for fixing #448602 + #506961 and providing new Firefox APIs that allow enumerating event listeners on a web page!
Update: all necessary APIs for Eventbug have been backported to Firefox 3.6b3pre.
So, see it in action!
The screenshot below shows content of the Events panel and three side panels (click the image to see the original size).
Side panels are synchronized according to the selected listener in the main content area.
The extension also registers a new Events side-panel within the HTML panel.
In this case the Events side panel shows all registered event listeners for the selected HTML element.
Eventbug is still in alpha phase and there are some known issues.
- The panel is not updated if listeners are dynamically appended or removed upon user actions. You have to manually click the Refresh button (in the toolbar). This will be fixed as soon as #524674 is fixed (thanks Smaug! 🙂 )
- If a listener is defined using a HTML attribute (e.g.
click="alert('hello world!')") the source code is not compiled till the listener is actually executed (Firefox optimization). Eventbug UI doesn't reflect this and it can happen that link to a listener's source code doesn't work. The link should be disabled if the script object is not available.
- The Script side panel doesn't yet allow to create breakpoint's.