[webkit-gtk] Custom JavaScript injection API and Isolated Worlds in WebKit2GTK+

Carlos Garcia Campos cgarcia at igalia.com
Sun Aug 11 00:53:25 PDT 2013


El sáb, 10-08-2013 a las 12:45 -0300, Gustavo Noronha Silva escribió:
> On Sex, 2013-08-09 at 18:39 +0200, Sergio Villar Senin wrote:
> > > What do you think? is this enough or am I missing something?
> > 
> > The API looks great to me. I am not sure about the naming either,
> > perhaps WebKitWebFrame would look more familiar.
> 
> I agree!

Great! I'll submit patches next week. The freeze is coming :-)

> > The only doubt I have is whether it pays off the ScriptWorld object
> > you propose or not. The API looks well designed but if we are not
> > planing to add future API to that object maybe it's a bit overkill.
> 
> The good thing of using an object is it'll be easier to extend if we
> ever required. This looks like one of those cases in which that is quite
> likely to be needed, as more security and isolation features appear.

It's also very useful to handle the default world as a singleton and to
make the world emit the window-object-cleared signal, instead of
emitting it in the frame and pass the world as a callback parameter.
Note that if a world is never created, for apps not injecting javascript
at all, the signal is not even emitted (obviously as the object emitting
it doesn't exist).

Regarding the name, Martin proposed to use WebKitWebFrame, and if we
eventually expose frames in the UI process, use WebKitFrame there. And I
think it's a good idea, simpler (and shorter) than WebKitWebPageFrame,
but I think we can do it the other way around. Use WebKitFrame in the
web extensions API, and WebKitWebFrame in the UI, since wk1 users are
used to think of a WebKitWebFrame as a frame of a WebKitWebView.

> Cheers,
> 

-- 
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: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20130811/55ef8e5d/attachment.sig>


More information about the webkit-gtk mailing list