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

Carlos Garcia Campos cgarcia at igalia.com
Sat Jun 28 02:10:20 PDT 2014


El vie, 27-06-2014 a las 21:02 +0200, Federico Brega escribió:
> 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.

Indeed, we made webkit_web_view_run_javascript return a value to avoid
that kind of hacks.

> Is this still doable? Is there a cleaner way?

I guess we need python bindings of JavaScriptCore API. Another option
might be to provide a gobject wrapper of the JavaScriptCore API with
introspection annotations, making it available to other languages as
well (Wasn't this seed? Does that still work?). We might also benefit
from it in the C API since we could use JavaScript objects as properties
for example.

> Regards
> --
> Federico
> 

-- 
Carlos Garcia Campos
http://pgp.rediris.es:11371/pks/lookup?op=get&search=0xF3D322D0EC4582C3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20140628/e2ab00aa/attachment.sig>


More information about the webkit-gtk mailing list