[webkit-gtk] GObject DOM bindings

Dustin Falgout dustin at falgout.us
Fri Oct 7 20:16:35 PDT 2016


El vie, 07-10-2016 a las 14:54 +1100, Michael Gratton escribió:
> On Tue, Aug 30, 2016 at 9:57 PM, Gustavo Noronha Silva <gns at gnome.org
> > wrote:
> > Long term, I think it might pay off if we move away from GObject
> > bindings and into making running arbitrary JS code (possibly with
> > access
> > to GObject APIs through something like seed) on the page's JS
> > context
> > simpler. I think the GObject bindings were very useful in their
> > current
> > form when you could use them from your main program, but less so
> > when
> > you'll have to run it on the web process and set up some kind of
> > IPC
> > anyway.
> > 
> > Do we have an idea how people are using the DOM bindings today and
> > how?
> > Would they be properly served by an easier to use JS bridge?
> 
> I have a few data points for this as well. If the Geary WK2 port
> starts using a WebExtenison for DOM manipulation, then we'd want
> access to both WebKitDOMDOMSelection and WebKitDOMDOMTokenList. The
> latter is mostly for convenience, the former though is pretty
> important - we need to get user selections for things like quoting
> parts of an email for reply, and so on.


+1 for a JavaScript Bridge. I've always found using the DOM bindings to be a hassle and now with WebKit2 that's even more true today than ever. Instead of implementing JavaScript in C using the bindings, it makes more sense (IMO) just to use JavaScript directly. I could be completely wrong about this but it seems like cutting out the middle man would improve performance to some degree. But that's not really something I am concerned about. I'm more interested in lowering the overall maintenance burden as well as the barrier-to-entry for new contributors. That's why I think a JavaScript Bridge with a minimal, intuitive API is just what the doctor ordered :)

-- 
Dustin Falgout 
Web Developer

http://github.com/antergos/lightdm-webkit2-greeter


More information about the webkit-gtk mailing list