[webkit-dev] Fwd: WebKit2 Extending Javascript

Christian Frost cf at cfrost.dk
Tue Apr 16 23:56:29 PDT 2013


I ended up following Dominiks suggestion of changing some IDL files in
WebCore. Also, I have added a NPAPI plugin.


On Mon, Apr 8, 2013 at 2:51 PM, Dominik Röttsches
<dominik.rottsches at intel.com> wrote:
> 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

More information about the webkit-dev mailing list