[webkit-dev] JSObjectCallAsFunctionCallback question

Xiong browserwk at gmail.com
Thu May 14 19:03:47 PDT 2009


Hello all,

I have implement a JS object named "myObject" with the JavaScriptCore(JSC)
API, and it has a method named getValues(),  called as following:
    myObject.getValues();

And it define like this:
JSStaticFunction staticFunc[] = {
    {"getValues", getValue_cb, kJSPropertyAttributeReadOnly},
    {NULL, NULL, NULL, NULL}
};

The prototype of getValue_cb callback function like this:
JSValueRef getValue_cb(JSContextRef context, JSObjectRef function,
JSObjectRef object,
                        size_t argumentCount, const JSValueRef arguments[],
JSValueRef *exception)

I have two problems about the getValue_cb callback function:
1    what is the purpose of the "JSObjectRef function" variable? In my case,
we never use.
2    In this function, i want to get the propertyName of the method, in this
case, we need "getValues", can be implemented ?

Appreciate any clues~

Thanks.

-Xiong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090515/141de0c2/attachment.html>


More information about the webkit-dev mailing list