Question

I'm trying to debug a third party webpage which includes lots of javascript files. There isn't any javascript code in the page itself.

I would like to see what code will get executed when I click on a link. I can right click the link and inspect the html element, but how can I find what code will actually get executed when the link is clicked?

I'm using Chrome and Firefox, so a solution that works on either is fine.

I have seen this question, but that is asking specifically about inspector, whereas I don't really mind how the events are found (e.g. one option could be to use wget to download all the sources and the grep to search for the bindings - that would be ok if it works!).

Was it helpful?

Solution

Chrome: Right click on an element, inspect. Far right, there's an Event Listeners section.

OTHER TIPS

In Firebug you can use the command getEventListeners() or install the extension Eventbug and have a look at its Events panel.

In future versions of Firebug it might be that the functionality of Eventbug will be integrated, so that it's working like in the Chrome DevTools. See issue 5440.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top