Maintainer | gtk2hs-users@lists.sourceforge.net |
---|---|
Stability | provisional |
Portability | portable (depends on GHC) |
Safe Haskell | None |
Language | Haskell98 |
Access to the WebKit Inspector
- data WebInspector
- class GObjectClass o => WebInspectorClass o
- webInspectorGetInspectedUri :: (WebInspectorClass self, GlibString string) => self -> IO string
- webInspectorGetWebView :: WebInspectorClass self => self -> IO (Maybe WebView)
- webInspectorInspectCoordinates :: WebInspectorClass self => self -> Int -> Int -> IO ()
- webInspectorShow :: WebInspectorClass self => self -> IO ()
- webInspectorClose :: WebInspectorClass self => self -> IO ()
- webInspectorInspectedUri :: (WebInspectorClass self, GlibString string) => ReadAttr self string
- webInspectorJSProfilingEnable :: WebInspectorClass self => Attr self Bool
- webInspectorTimelineProfilingEnabled :: WebInspectorClass self => Attr self Bool
- webInspectorWebView :: WebInspectorClass self => ReadAttr self WebView
- attachWindow :: WebInspectorClass self => Signal self (IO Bool)
- detachWindow :: WebInspectorClass self => Signal self (IO Bool)
- closeWindow :: WebInspectorClass self => Signal self (IO Bool)
- showWindow :: WebInspectorClass self => Signal self (IO Bool)
- finished :: WebInspectorClass self => Signal self (IO ())
- inspectWebView :: WebInspectorClass self => Signal self (WebView -> IO WebView)
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
data WebInspector Source
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
:: WebInspectorClass self | |
=> self |
|
-> Int |
|
-> Int |
|
-> 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
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.