On 2009-01-18, at 20:43, Nilesh Patil wrote:
I am not really sure which example/reference you are following. If u need to call some native functions in JavaScript, JavaScript interpreter should be aware of that functions/native component you are trying to access. So process would be to implement such mechanism in JavaScriptCore. You can look at example how its been done for some standard JavaScript objects and their properties.
JavaScriptCore provides a public API so it is *not* necessary to implement anything inside JavaScriptCore. In fact, it would be highly undesirable to do so.
You will find corresponding source in WebCore/bindings , WebCore/bindings/js and JavaScriptCore/kjs/bindings.
These directories are not at all relevant to the question that the original poster asked.
- Mark
2009/1/17 <webkit...@aol.com>:Hi,I am trying to extend the javascript to invoke custom C code in webkit. Basically my requirement is to load a webpage that contains the UI built in Java script and on some user actions, I need to call C library functions onLinux. I looked at the testapi.c in API directory and added similarfunctions in GtkLauncher program(main.c) to add "MyObject". But when a I load a webpage containing "MyObject" I am getting error "ReferenceError: Can't find variable: MyObject". Then I copied the entire testapi.c intoGtkLauncher main.c, replaced main() with test_main() and invoked thetest_api() (along with a few tweaks for the header files .). This way I am able to get all the tests (testapi.js) succeed, but I am still getting the "ReferenceError". Looking at the code, I see that there is a context that is passed, which I believe is not passed to the webview. Is there a way inwhich I can use the same context as the webview and add my object? Regards, WebK ________________________________ Which stars will make the biggest headlines in 2009? Get Hollywoodpredictions, celebrity holiday photos and more with the PopEater Toolbar._______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev