2
I don’t know if this question fits the OS standards/scope, but here it goes:
It is possible to detect the origin(file) of a javascript function through the developer console in the current browser?
For example:
I have a javascript file with the function:
function teste(){
}
Entering console mode if you start writing te
note that there is a function teste
, but right now I don’t know where it comes from.
In my view the only method for me to ascertain its origin would be to check all requests made to the server by files. js and do a search for the string teste()
in each of those files.
But if the site has several javascript files it is difficult to determine the correct file, not to mention if the script is not with the code obfuscated which will complicate things even more.
Which begs the question:
Is there a more viable method for me to detect the origin of this function?
For example if this function was a event listener
one-click on a button I could easily detect its origin inspected the button element.
You need to find out which file(file) the function is declared in?
– Mathiasfc
Yes exactly.
– lazyFox