Prev: Executing JS code @ location.href
Next: Find all event listeners on a link, including delegatedlisteners?
From: Matt Kruse on 26 May 2010 14:09 I'm trying to reverse-engineer a page (Facebook, in particular) and figure out what happens when a certain link is clicked. For this exercise, I only care about Firefox. What is the best way to find out what happens when I click a link, what function calls are fired, and on what elements they are attached to as listeners? I have Firebug, of course, but perhaps I don't know how to use it correctly to find this info. Thanks, Matt Kruse
From: kangax on 28 May 2010 02:18 On 5/26/10 2:09 PM, Matt Kruse wrote: > I'm trying to reverse-engineer a page (Facebook, in particular) and > figure out what happens when a certain link is clicked. For this > exercise, I only care about Firefox. > > What is the best way to find out what happens when I click a link, > what function calls are fired, and on what elements they are attached > to as listeners? > > I have Firebug, of course, but perhaps I don't know how to use it > correctly to find this info. Start up Firefox 3.7 with Firebug 1.5+ and check newly added "Events" panel. It should give you a list of listeners added to a particular element. <http://www.softwareishard.com/blog/firebug/eventbug-alpha-released/> It won't help much if they're using event delegation of course, but you can always trace where the "top" listener is and go from there. -- kangax
From: nick on 28 May 2010 02:28
On May 26, 2:09 pm, Matt Kruse <m...(a)thekrusefamily.com> wrote: > I'm trying to reverse-engineer a page (Facebook, in particular) and > figure out what happens when a certain link is clicked. For this > exercise, I only care about Firefox. Give one of the dev builds of chromium a shot... > What is the best way to find out what happens when I click a link, > what function calls are fired, and on what elements they are attached > to as listeners? Open the debug console, click scripts tab (in chromium, don't remember firebug equivalent), hit the pause button (looks like two vertical lines), click the link. > I have Firebug, of course, but perhaps I don't know how to use it > correctly to find this info. Try the developer tools in chrome, you'll never look back. |