[webkit-gtk] Bug#749251: Bug#749251: cyclograph-gtk2: depends on python-webkit which is deprecated

Federico Brega charon.66 at gmail.com
Fri Jun 27 12:02:48 PDT 2014


2014-06-27 8:34 GMT+02:00 Carlos Garcia Campos <cgarcia at igalia.com>:
> Yes, the problem is that webkit_javascript_result_get_value() returns a
> JSValueRef, but there's no gobject-introspection for JavaScriptCore API.
> I don't think it worked in WebKit1 either, but in WebKit1
> webkit_web_view_run_script didn't return anything, so if you are porting
> from WebKit1, maybe you can just ignore the return value for now. I have
> some comments about the code, see below.

Thank you for your comments, we'll consider them while porting the
codebase to webkit2.
As you already said webkit1 doesn't have a proper way to get results back
from javascript so we are using an hack:

        self.view.execute_script("oldtitle=document.title;document.title=document.getElementById('gpx').innerHTML")
        gpxcontent = unicode(self.view.get_main_frame().get_title())
        self.view.execute_script('document.title=oldtitle;')

We hoped to avoid this and use something nicer.
Is this still doable? Is there a cleaner way?

Regards
--
Federico


More information about the webkit-gtk mailing list