Today I went looking for Javascript code to give me the name of the currently executing function. I found answers here and here. And now I have the following in my script:
var fname = arguments.callee.toString().split(/ /)[1].split(/\(/)[0];
Woe betide if callee is ever disabled!
© Copyright Bruce M. Axtens, 2012
No comments:
Post a Comment