On 04/04/2013 10:33 AM, Christian Frost wrote:

My problem is that I have to extend Javascript in WebKit2. That is, I
have to add a set of global variables and functions. Potentially I
also need to add custom classes. However, this doesn't seem to be
possible in WebKit2 since it is not yet supported. Can you help me on
this matter?

If you're looking for adding custom JavaScript API at compile time and make it available for all scripting contexts, there is no problem with that (and there's not a big difference between WebKit1 and 2 for that matter). You can start by familiarizing yourself with an IDL file that's similar to your purposes, and look at the related .cpp and *Custom.cpp files that implement the API that corresponds to that IDL file.

Dominik
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to