Associating DOM elements with Javascript funtions

23 views
Skip to first unread message

Konstantinos Papakonstantinou

unread,
Sep 7, 2013, 4:05:11 AM9/7/13
to fir...@googlegroups.com
Hello,

I am completely new to Firebug. I want to know if Firebug can show me the Javascript functions/code that an element may be associated with.

For example, choosing a button and Firebug directing me to the code that is triggered to run when clicking that button.

Thanks for your help.

Sebastian Zartner

unread,
Sep 7, 2013, 4:56:28 AM9/7/13
to fir...@googlegroups.com
There's a command called getEventListeners(), which allows to get all related event listeners. You may also be interested in the Firebug extension called Eventbug.
We also plan to integrate Eventbug into Firebug.

Sebastian

Jan Honza Odvarko

unread,
Sep 9, 2013, 10:19:02 AM9/9/13
to fir...@googlegroups.com
> For example, choosing a button and Firebug directing me to the code that
> is triggered to run when clicking that button.
You can also use a function called break-on-next, which can stop
JavaScript execution on the next executed line
(e.g. at the line that is called after you click a button)

http://www.softwareishard.com/blog/firebug/firebug-15-break-on-next/
https://getfirebug.com/wiki/index.php/Script_Panel#Break_On_Next

Honza
Reply all
Reply to author
Forward
0 new messages