Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Obsolete since JavaScript 1.8.5
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Retrieve the given name for a specified function. Use JS_GetFunctionId instead.

Syntax

const char *
JS_GetFunctionName(JSFunction *fun);
Name Type Description
fun JSFunction * A pointer to a JavaScript function.

Description

JS_GetFunctionName retrieves the function name associated with a function pointer, fun. The return value is either the name of a function, or the string "anonymous", which indicates that the function was not assigned a name when created.

The pointer returned by this function is valid only as long as the specified function, fun, exists.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, tschneidereit, Jorend, Nickolay, Sheppy, MMondor, Dria, Callek, Tservo
 Last updated by: arai,