For example, if I run some page in Chrome with the following code:
<div onclick="someFunction('test')"></div>
I would like to know which js file contains "someFunction". Is it possible and how? (I suppose this can be done using debugging, but don't know how)
In Firefox with a web developer add-in, information / view Javascript / Expand All, find "someFunction".
Of course, there are many other ways to do this, but this add-on puts all the JS from the page in one browser, making it easy to search the entire site.
what I'm doing: [Assuming you have access to the source code]
grep -r "function someFunction" .
. - , . , "function someFunction".
.
, , , , , :
grep -r "function someFunction" | grep -v "withouth this text"
, ! , , cygwin?
, , , someFunction ...
( → → - ) .
Google , submit (a, b) - , .
submit . . , . .