uintN JS_GetFunctionFlags(JSFunction *fun);
Name Type Description
fun JSFunction * The function to examine.


JS_GetFunctionFlags retrieves the function flags of a given JavaScript function, fun. These flags are for the JavaScript engine’s internal use. Most applications can’t do anything useful with them.

Function flags are a value of type uintN, the bitwise OR of zero or more of the JSFUN flags described below. Once a function is created, its flags cannot be modified.


The function is an Array generic, such as Array.map.


The function uses language features such as closures, with, or eval that require extra work on the part of the interpreter.


The function is a JavaScript function written as a FunctionExpression rather than a FunctionDeclaration, a syntactic distinction. See ECMA 262-3 §13.


The function is native can be used as a constructor with the new keyword. (The meaning of this flag may change.)

MXR ID Search for JS_GetFunctionFlags

Document Tags and Contributors

Contributors to this page: Jimb, Jorend
Last updated by: Jorend,