Can I get the name of the currently running function in javascript?

Posted by sprugman on Stack Overflow See other posts from Stack Overflow or by sprugman
Published on 2009-06-18T15:10:34Z Indexed on 2010/03/26 12:33 UTC
Read the original article Hit count: 192

Filed under:
|
|

Is it possible to do this:

myfile.js:
function foo() {
    alert(<my-function-name>);
    // pops-up "foo"
    // or even better: "myfile.js : foo"
}

I've got the dojo and jquery frameworks in my stack, so if either of those make it easier, they're available.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery