[webkit-help] JavaScript C++ bindings in webkit

Niklas Nylund niklas at acrodea.co.jp
Thu Jun 10 02:52:04 PDT 2010


Try reading http://developer.apple.com/mac/library/documentation/Carbon/Reference/WebKit_JavaScriptCore_Ref/JSObjectRef_h/index.html#//apple_ref/c/tdef/JSClassDefinition

JSClassDefinition has a member called "callAsConstructor", that's probably the one you want. If someone on the list knows this area of webkit/js better, please correct me if I am wrong. I am simply guessing from what the docs say.


On 10 jun 2010, at 11.43, Wadii Guedria wrote:

> Hi,
> I have a question about javascript/C++ bindings in webkit.
> For example, I have an extern C++ class (attributes+methodes)
> My objective is to access to this class from javascript like this:
> var object = new mycpluplusclass();
> object.getattribute;
> object.mycplusplusfunction;
> ....
> I know that I need to use JSClassDefinition and set the JSStaticFunction. But I dont know how to define my C++ constructor in JSObjectCallAsConstructorCallback
> Same thing for get/set  Property(C++ attribute).
> Any suggestions are welcome.
> Regards,
> Wadii
> _______________________________________________
> webkit-help mailing list
> webkit-help at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-help

More information about the webkit-help mailing list