gi-webkit-3.0.12: WebKit bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit.Objects.WebInspector

Contents

Description

The WebKit Inspector is a graphical tool to inspect and change the content of a WebView. 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 WebSettings of the WebView has set the WebSettings:enable-developer-extras to true otherwise no inspector is available.

<informalexample><programlisting> /<!-- -->* 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); </programlisting></informalexample>

Synopsis

Exported types

Methods

close

webInspectorClose Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebInspector a) 
=> a

webInspector: the WebInspector that will be closed

-> m () 

Causes the Web Inspector to be closed.

Since: 1.1.17

getInspectedUri

webInspectorGetInspectedUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebInspector a) 
=> a

webInspector: a WebInspector

-> m Text

Returns: a pointer to the URI as an internally allocated string; it should not be freed, modified or stored.

Obtains the URI that is currently being inspected.

Since: 1.0.3

getWebView

webInspectorGetWebView Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebInspector a) 
=> a

webInspector: a WebInspector

-> m WebView

Returns: the WebView instance that is used to render the inspector or Nothing if it is not yet created.

Obtains the WebView that is used to render the inspector. The WebView instance is created by the application, by handling the WebInspector::inspect-web-view signal. This means that this method may return Nothing if the user hasn't inspected anything.

Since: 1.0.3

inspectCoordinates

webInspectorInspectCoordinates Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebInspector a) 
=> a

webInspector: the WebInspector that will do the inspection

-> Double

x: the X coordinate of the node to be inspected

-> Double

y: the Y coordinate of the node to be inspected

-> m () 

Causes the Web Inspector to inspect the node that is located at the given coordinates of the widget. The coordinates should be relative to the WebView widget, not to the scrollable content, and may be obtained from a Event directly.

This means x, and y being zero doesn't guarantee you will hit the left-most top corner of the content, since the contents may have been scrolled.

Since: 1.1.17

inspectNode

webInspectorInspectNode Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebInspector a, IsDOMNode b) 
=> a

webInspector: the WebInspector that will do the inspection

-> b

node: the DOMNode to inspect

-> m () 

Causes the Web Inspector to inspect the given node.

Since: 1.3.7

show

data WebInspectorShowMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsWebInspector a) => MethodInfo * WebInspectorShowMethodInfo a signature Source # 

webInspectorShow Source #

Arguments

:: (HasCallStack, MonadIO m, IsWebInspector a) 
=> a

webInspector: the WebInspector that will be shown

-> m () 

Causes the Web Inspector to be shown.

Since: 1.1.17

Properties

inspectedUri

data WebInspectorInspectedUriPropertyInfo Source #

Instances

AttrInfo WebInspectorInspectedUriPropertyInfo Source # 
type AttrOrigin WebInspectorInspectedUriPropertyInfo Source # 
type AttrLabel WebInspectorInspectedUriPropertyInfo Source # 
type AttrGetType WebInspectorInspectedUriPropertyInfo Source # 
type AttrBaseTypeConstraint WebInspectorInspectedUriPropertyInfo Source # 
type AttrSetTypeConstraint WebInspectorInspectedUriPropertyInfo Source # 
type AttrAllowedOps WebInspectorInspectedUriPropertyInfo Source # 

javascriptProfilingEnabled

data WebInspectorJavascriptProfilingEnabledPropertyInfo Source #

Instances

AttrInfo WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 
type AttrOrigin WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 
type AttrLabel WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 
type AttrGetType WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 
type AttrBaseTypeConstraint WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 
type AttrSetTypeConstraint WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 
type AttrAllowedOps WebInspectorJavascriptProfilingEnabledPropertyInfo Source # 

timelineProfilingEnabled

data WebInspectorTimelineProfilingEnabledPropertyInfo Source #

Instances

AttrInfo WebInspectorTimelineProfilingEnabledPropertyInfo Source # 
type AttrOrigin WebInspectorTimelineProfilingEnabledPropertyInfo Source # 
type AttrLabel WebInspectorTimelineProfilingEnabledPropertyInfo Source # 
type AttrGetType WebInspectorTimelineProfilingEnabledPropertyInfo Source # 
type AttrBaseTypeConstraint WebInspectorTimelineProfilingEnabledPropertyInfo Source # 
type AttrSetTypeConstraint WebInspectorTimelineProfilingEnabledPropertyInfo Source # 
type AttrAllowedOps WebInspectorTimelineProfilingEnabledPropertyInfo Source # 

webView

data WebInspectorWebViewPropertyInfo Source #

Instances

AttrInfo WebInspectorWebViewPropertyInfo Source # 
type AttrOrigin WebInspectorWebViewPropertyInfo Source # 
type AttrLabel WebInspectorWebViewPropertyInfo Source # 
type AttrGetType WebInspectorWebViewPropertyInfo Source # 
type AttrBaseTypeConstraint WebInspectorWebViewPropertyInfo Source # 
type AttrSetTypeConstraint WebInspectorWebViewPropertyInfo Source # 
type AttrAllowedOps WebInspectorWebViewPropertyInfo Source # 

Signals

attachWindow

closeWindow

detachWindow

finished

inspectWebView

showWindow