2009/6/1 Jack Wootton <[email protected]>: > Hi all, Hi!
> I'm attempting to use the function JSObjectMakeFunction described here: > > http://gemma.apple.com/documentation/Carbon/Reference/WebKit_JavaScriptCore_Ref/JSObjectRef/index.html > > I would like to call a JavaScript function from C. I assume the > following is required: > > 1. Create a function using JSObjectMakeFunction. > 2. Add it as a property of the Window JSObjectRef. > 3. Call it using JSObjectCallAsFunction. JSObjectMakeFunction creates a JavaScript function *from* C. To just call a JS function (not create one), all you need to do is get the function object (most likely JSObjectGetProperty() on the global object) and then call it with JSObjectCallAsFunction(). -- Kalle Vahlman, [email protected] Powered by http://movial.com Interesting stuff at http://sandbox.movial.com See also http://syslog.movial.fi _______________________________________________ webkit-dev mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

