webkitgtk3-0.13.1.3: Binding to the Webkit library.

Maintainergtk2hs-users@lists.sourceforge.net
Stabilityprovisional
Portabilityportable (depends on GHC)
Safe HaskellNone
LanguageHaskell98

Graphics.UI.Gtk.WebKit.WebInspector

Contents

Description

Access to the WebKit Inspector

Synopsis

Description

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 Widget which can be embedded into an application to show the inspector.

The inspector is available when the WebKitWebSettings of the WebKitWebView has set the enableDeveloperExtras to true otherwise no inspector is available.

Types

Methods

webInspectorGetInspectedUri :: (WebInspectorClass self, GlibString string) => self -> IO string Source

Obtains the URI that is currently being inspected

webInspectorGetWebView :: WebInspectorClass self => self -> IO (Maybe WebView) Source

Obtains the WebView that is used to render the WebInspector.

The WebView instance is created by the application, by handling the "inspect-web-view" signal. This means that it may return Nothing if the user hasn't inspected anything

webInspectorInspectCoordinates Source

Arguments

:: WebInspectorClass self 
=> self

webInspector the WebKitWebInspector that will do the inspection

-> Int

x the X coordinate of the node to be inspected

-> Int

y the Y coordinate of the node to be inspected

-> IO () 

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 WebKitWebView 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

webInspectorShow :: WebInspectorClass self => self -> IO () Source

Causes the Web Inspector to be shown.

  • Since 1.1.17

webInspectorClose :: WebInspectorClass self => self -> IO () Source

Causes the Web Inspector to be closed.

  • Since 1.1.17

Attribute

webInspectorInspectedUri :: (WebInspectorClass self, GlibString string) => ReadAttr self string Source

The URI that is currently being inspected.

webInspectorJSProfilingEnable :: WebInspectorClass self => Attr self Bool Source

This is enabling JavaScript profiling in the Inspector. This means that Console.profiles will return the profiles.

webInspectorTimelineProfilingEnabled :: WebInspectorClass self => Attr self Bool Source

This is enabling Timeline profiling in the Inspector.

Default value: False

  • Since 1.1.17

webInspectorWebView :: WebInspectorClass self => ReadAttr self WebView Source

The Web View that renders the Web Inspector itself.

Signals

attachWindow :: WebInspectorClass self => Signal self (IO Bool) Source

Emitted when the inspector should appear in a separate window

return True if the signal is handled

detachWindow :: WebInspectorClass self => Signal self (IO Bool) Source

Emitted when the inspector should appear in a separate window.

return True if the signal has been handled

closeWindow :: WebInspectorClass self => Signal self (IO Bool) Source

Emitted when the inspector window should be closed.

return True if the signal is handled.

showWindow :: WebInspectorClass self => Signal self (IO Bool) Source

Emitted when the inspector window should be displayed. Notice that the window must have been created already by handling inspectWebView.

return True if the signal has been handled

finished :: WebInspectorClass self => Signal self (IO ()) Source

Emitted when the inspection is done. You should release your references on the inspector at this time. The inspected WebView may no longer exist when this signal is emitted.

inspectWebView :: WebInspectorClass self => Signal self (WebView -> IO WebView) Source

Emitted when the user activates the inspect context menu item to inspect a web view. The application which is interested in the inspector should create a window, or otherwise add the WebView it creates to an existing window.

You don't need to handle the reference count of the WebView instance you create; the widget to which you add it will do that.