[webkit-gtk] Deciding the deprecation path for WebKit1

Adrian Perez de Castro aperez at igalia.com
Fri Apr 11 10:43:34 PDT 2014


Hi!

Carlos Garcia Campos <cgarcia at igalia.com> writes:

> El mié, 19-03-2014 a las 12:12 -0700, Niranjan Rao escribió:
>
>> Gtk annotations is also important for others so that languages like 
>> python can use it. But this raises a very interesting problem. If python 
>> like language needs DOM access, how do we do it? There are lot of tools 
>> out there that depend upon DOM access and use Gtk annotations.
>
> That's a good point, we need to figure out a way to support web
> extensions written in other languages. 

Most of the applications using languages other than C or C++ are using
Python or JavaScript. There are GObject-Introspection annotations for
the API that can be used from Web Extensions, so it should be already
possible to make extensions in Python/JS.

As en example, right now it should be reasonably easy to write a stub
Web Extension in C that uses the CPython API to create an interpreter
when the Web Extension is initialized, loads a Python script, and
calls a function in it passing the WebKitWebExtension and the
GVariant received by the initialization function [1].

Another approach would be to teach the WebKitGTK+ injected bundle
how to load Python/JS/etc web extensions. The problem I see with
this approach is that WebKitWebProcess could end up linking to e.g.
libpython, and I would rather avoid linking directly — though maybe
dlopen()'ing could be an option.

One more option could be using the non-UI part of libpeas [2], as
it already includes loaders for Python2, Python3 and Seed (JS).

Personally, I would go for having the code for stub Web Extensions
that load Python/JS available somewhere in a Git repo, and referenced
From a “Porting to WebKit2GTK+”, so developers can grab the code
and adapt it to their needs.

WDYT?


-Adrian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140411/5e61f32f/attachment.sig>


More information about the webkit-gtk mailing list