Entry: JS_PropertyStub (Function)
Summary: Provides a dummy property argument for API routines that requires property information.
Syntax:
JSBool JS_PropertyStub(JSContext *cx, JSObject *obj, jsval id,
jsval *vp);
Argument Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
obj JSObject * Pointer to the object for this stub.
id jsval The ID for the stub.
vp jsval * Pointer to a jsval for the stub.
Description:
JS_PropertyStub provides a convenient way to pass a property to an API function that requires one without requiring you to create an actual property definition. This is especially useful for internal operations, such as class definitions. A property stub is a place holder for an actual property assignment function.
As designed, JS_PropertyStub does not use the arguments you pass to it, and simply returns JS_TRUE.
See also:
|
|
|