Hi,
        I try to get the URI of a newly created web view. The goal of this is 
to authorize or not the opening of windows or popups (window.open()) in 
function of their domain.
        For doing this, I connect signals "create-web-view" and 
"web-view-ready" :

> gboolean webviewReady_handler(WebKitWebView *newWebview, gpointer user_data)
> {
>     g_print("\n\n #NEW WINDOW# referer: %s, URI: %s\n", 
> webkit_web_view_get_uri(WEBKIT_WEB_VIEW(user_data)), 
> webkit_web_view_get_uri(newWebview));
> 
>     return true;
> }
> 
> WebKitWebView* createWebView_handler(WebKitWebView *currentWebView, 
> WebKitWebFrame *frame, gpointer user_data)
> {
>     GtkWidget * newWebview = webkit_web_view_new();
>     g_signal_connect(newWebview, "web-view-ready", 
> G_CALLBACK(webviewReady_handler), currentWebView);
> 
>     return WEBKIT_WEB_VIEW (newWebview);
> }


        But, what I get is something like that :

>  #NEW WINDOW# referer: http://foo.bar, URI: (null)


        Could someone help me please ?
Regards,

---------------------------------------------------------------------------------------

Jonathan MESNY.
Élève-Ingénieur en 4ème année d'informatique à l'INSA de Lyon

Téléphone portable :  06 77 27 99 55
@personnelle :        [email protected]
@étudiante :          [email protected]
@web :                http://jonathanmesny.fr

---------------------------------------------------------------------------------------

_______________________________________________
webkit-gtk mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-gtk

Reply via email to