[webkit-gtk] Extending JavascriptCore

Christian Frost cf at cfrost.dk
Tue Apr 2 05:20:34 PDT 2013


Thanks for the reply. I have been looking into the linked example,
however from the example it seems that I have to put my extensions in
a directory and point webkit to load them from there, but I cannot
figure out the format in which the extensions should be.

Is there no other examples? Or can anymore provide a simple example
that I can extend?

On Fri, Feb 22, 2013 at 9:39 PM, Martin Robinson
<martin.james.robinson at gmail.com> wrote:
> On Fri, Feb 22, 2013 at 4:28 AM, Christian Frost <cf at cfrost.dk> wrote:
>
>> However, I use WebKit2 which may cause that my WebKitWebView does not
>> have the "window-object-cleared" signal. Therefore it cannot be
>> connected. I have tried to "hook" it to the "resource-load-started"
>> with the following callback function:
>
> In WebKit2, the DOM lives in a different process, so if you want to
> inject JavaScript objects you need to write a WebKitWebExtension [1].
> There's very little documentation around this subject, so I suggest
> looking at the unit tests we have for it in the WebKit source
> repository [2].
>
> 1. http://webkitgtk.org/reference/webkit2gtk/unstable/WebKitWebExtension.html
> 2. http://trac.webkit.org/browser/trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestWebExtensions.cpp
>
> --Martin



--
Regards
Christian


More information about the webkit-gtk mailing list