[webkit-gtk] Usefulness of webkit_frame_is_main_frame ?

Carlos Garcia Campos cgarcia at igalia.com
Tue Feb 23 09:24:12 PST 2016

El mar, 23-02-2016 a las 15:10 +0100, Jérémy Lal escribió:
> Context:
> I want to prevent iframes from loading.
> I naively looked into getting the frame from which a policy decision
> came,
> or the frame for which a send request (in the extension) is called,
> but i can't find a
> way to get an actual frame instance from which
> webkit_frame_is_main_frame(frame)
> would tell me if i want to let the frame load or not.
> Question:
> the only webkit2gtk function i found that provides a frame is
> webkit_web_page_get_main_frame(page)
> which leads to tautology
> webkit_frame_is_main_frame(webkit_web_page_get_main_frame(page)) ==
> Am i missing a use for webkit_frame_is_main_frame ?

I think you can receive a non main frame in WebKitScriptWorld::window-
object-cleared signal callback.

> Jérémy
> _______________________________________________
> webkit-gtk mailing list
> webkit-gtk at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-gtk
Carlos Garcia Campos

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20160223/ce41ddbb/attachment.sig>

More information about the webkit-gtk mailing list