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](https://stackoverflow.com/questions/18561546/finding-bounded-events-in-inspector), 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!).