I want to be able to iterate through all JavaScript functions in my document and, for instance, add an alert('ok'); to them.
so if I have:
function a(num) {
return num;
}
after I run my javascript code and call this function, it will actually do:
{
alert('ok');
return num;
}
I know I can access a function using window.[funcName], but how can I iterate thru all functions and edit them?
thanks
PS: I know this is not a very good idea, but it's just for a debug environment