Back to Seed Clases

WebKit


Classes

Interfaces

Structs

Unions

Enums

GObject.Object
parent-child marker WebKit.WebInspector

Class WebKit.WebInspector

Import line: WebKit = imports.gi.WebKit;
GIR File: WebKit-3.0.gir
C documentation: WebKitWebInspector
Class : WebInspector
Extends: GObject.Object
The WebKit Inspector is a graphical tool to inspect and change
the content of a WebKitWebView. It also includes an interactive
JavaScriptDebugger. Using this class one can get a GtkWidget which
can be embedded into an application to show the inspector.
The inspector is available when the WebKitWebSettings of the
WebKitWebView has set the WebKitWebSettings:enable-developer-extras
to true otherwise no inspector is available.

/* Enable the developer extras */
WebKitWebSettings *setting = webkit_web_view_get_settings (WEBKIT_WEB_VIEW(my_webview));
g_object_set (G_OBJECT(settings), "enable-developer-extras", TRUE, NULL);
/* load some data or reload to be able to inspect the page*/
webkit_web_view_open (WEBKIT_WEB_VIEW(my_webview), "http://www.gnome.org");
/* Embed the inspector somewhere */
WebKitWebInspector *inspector = webkit_web_view_get_inspector (WEBKIT_WEB_VIEW(my_webview));
g_signal_connect (G_OBJECT (inspector), "inspect-web-view", G_CALLBACK(create_gtk_window_around_it), NULL);
g_signal_connect (G_OBJECT (inspector), "show-window", G_CALLBACK(show_inpector_window), NULL));
g_signal_connect (G_OBJECT (inspector), "notify::inspected-uri", G_CALLBACK(inspected_uri_changed_do_stuff), NULL);
Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events - usage syntax: this.signals.EVENTNAME.connect( Function )
Event Defined By
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
WebKit.WebView
Property
web_inspector : WebKit.WebInspector read only
The associated WebKitWebInspector instance.
WebKit.WebView
Method
get_inspector () : WebKit.WebInspector
Obtains the WebKitWebInspector associated with the
WebKitWebView.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:18:03 GMT+0800 (HKT)