JS_GetFunctionFlags 编辑
Obsolete since JSAPI 19
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 function flags of a given JavaScript function.
Syntax
unsigned int
JS_GetFunctionFlags(JSFunction *fun);
Name | Type | Description |
---|---|---|
fun | JSFunction * | The function to examine. |
Description
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 unsigned int
, the bitwise OR of zero or more of the JSFUN
flags described below. Once a function is created, its flags cannot be modified.
JSFUN_GENERIC_NATIVE
The function is an
Array
generic, such asArray.map
.JSFUN_HEAVYWEIGHT
The function uses language features such as closures,
with
, oreval
that require extra work on the part of the interpreter.JSFUN_LAMBDA
The function is a JavaScript function written as a FunctionExpression rather than a FunctionDeclaration, a syntactic distinction. See ECMA 262-3 §13.
JSFUN_CONSTRUCTOR
The function is native can be used as a constructor with the
new
keyword. (The meaning of this flag may change.)
See Also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论