JS::IdentifyStandardInstance 编辑
This article covers features introduced in SpiderMonkey 31
Determine if the given object is an instance/prototype/constructor for a standard class.
Syntax
JSProtoKey
JS::IdentifyStandardInstance(JSObject *obj);
JSProtoKey
JS::IdentifyStandardPrototype(JSObject *obj);
JSProtoKey
JS::IdentifyStandardInstanceOrPrototype(JSObject *obj);
JSProtoKey
JS::IdentifyStandardConstructor(JSObject *obj); // Added in SpiderMonkey 38
Name | Type | Description |
---|---|---|
obj | JSObject * | Pointer to the instance/prototype/constructor object to determine. |
Description
JS::IdentifyStandardInstance
determines if the given object is an instance for a standard class. If so, return the associated JSProtoKey
. If not, return JSProto_Null
.
JS::IdentifyStandardPrototype
determines if the given object is a prototype for a standard class. If so, return the associated JSProtoKey
. If not, return JSProto_Null
.
JS::IdentifyStandardInstanceOrPrototype
determines if the given object is an instance or prototype for a standard class. If so, return the associated JSProtoKey
. If not, return JSProto_Null
.
JS::IdentifyStandardConstructor
determines if the given object is a constructor for a standard class. If so, return the associated JSProtoKey
. If not, return JSProto_Null
.
See Also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论