SyntaxFix
Write A Post
Hire A Developer
Questions
This should do it:
var fn = arguments.callee.toString().match(/function\s+([^\s\(]+)/); alert(fn[1]);
For the caller, just use caller.toString().
caller.toString()