Method

WebKit2WebViewget_uri

Declaration [src]

const gchar*
webkit_web_view_get_uri (
  WebKitWebView* web_view
)

Description [src]

Returns the current active URI of web_view.

The active URI might change during a load operation:

When nothing has been loaded yet on web_view the active URI is NULL. When a new load operation starts the active URI is the requested URI: If the load operation was started by webkit_web_view_load_uri(), the requested URI is the given one. If the load operation was started by webkit_web_view_load_html(), the requested URI is “about:blank”. If the load operation was started by webkit_web_view_load_alternate_html(), the requested URI is content URI provided. If the load operation was started by webkit_web_view_go_back() or webkit_web_view_go_forward(), the requested URI is the original URI of the previous/next item in the WebKitBackForwardList of web_view. If the load operation was started by webkit_web_view_go_to_back_forward_list_item(), the requested URI is the opriginal URI of the given WebKitBackForwardListItem. If there is a server redirection during the load operation, the active URI is the redirected URI. When the signal WebKitWebView::load-changed is emitted with WEBKIT_LOAD_REDIRECTED event, the active URI is already updated to the redirected URI. When the signal WebKitWebView::load-changed is emitted with WEBKIT_LOAD_COMMITTED event, the active URI is the final one and it will not change unless a new load operation is started or a navigation action within the same page is performed.

You can monitor the active URI by connecting to the notify::uri signal of web_view.

Gets propertyWebKit2.WebView:uri

Return value

Returns: const gchar*
 

The current active URI of web_view or NULL if nothing has been loaded yet.

 The data is owned by the instance.
 The value is a NUL terminated UTF-8 string.