JS_PSGS 编辑
This article covers features introduced in SpiderMonkey 17
Macros for describing properties, for use with JS_DefineProperties
and JS_InitClass
.
Syntax
#define JS_PSG(name, getter, flags) ... #define JS_PSGS(name, getter, setter, flags) ... #define JS_SELF_HOSTED_GET(name, getterName, flags) ... // Added in SpiderMonkey 31 #define JS_SELF_HOSTED_GETSET(name, getterName, setterName, flags) ... // Added in SpiderMonkey 31 #define JS_PS_END ...
Name | Type | Description |
---|---|---|
name | const char * | The JavaScript name for the property. (or index, if JSPROP_INDEX is present in flags) |
getter | JSNative | Pointer to the C/C++ implementation of the getter function. |
setter | JSNative | Pointer to the C/C++ implementation of the setter function. |
flags | uint16 | The bitwise OR of any number of property attributes. |
getterName | const char * | The function's name in Self-Hosted JavaScript code for getter function. |
setterName | const char * | The function's name in Self-Hosted JavaScript code for setter function. |
Description
These macros encapsulate the definition of JSNative
-backed JSPropertySpec
s, by defining the JSNativeWrappers
for them.
See Also
- MXR ID Search for
JS_PSG
- MXR ID Search for
JS_PSGS
- MXR ID Search for
JS_SELF_HOSTED_GET
- MXR ID Search for
JS_SELF_HOSTED_GETSET
JSPropertySpec
JS_DefineProperties
JS_InitClass
- bug 684526 - added.
- bug 938728 - added
JS_SELF_HOSTED_GET
andJS_SELF_HOSTED_GETSET
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论