Interface

WebKit-6.0WebKitWebInspectorSignalSignatures

interface SignalSignatures {
    attach: () => boolean | void;
    "bring-to-front": () => boolean | void;
    closed: () => void;
    detach: () => boolean | void;
    notify: (arg0: GObject.ParamSpec) => void;
    "notify::attached-height": (pspec: GObject.ParamSpec) => void;
    "notify::can-attach": (pspec: GObject.ParamSpec) => void;
    "notify::inspected-uri": (pspec: GObject.ParamSpec) => void;
    "open-window": () => boolean | void;
}

Hierarchy (View Summary)

Index

Properties

attach: () => boolean | void

Emitted when the inspector is requested to be attached to the window where the inspected web view is. If this signal is not handled the inspector view will be automatically attached to the inspected view, so you only need to handle this signal if you want to attach the inspector view yourself (for example, to add the inspector view to a browser tab).

To prevent the inspector view from being attached you can connect to this signal and simply return true.

"bring-to-front": () => boolean | void

Emitted when the inspector should be shown.

If the inspector is not attached the inspector window should be shown on top of any other windows. If the inspector is attached the inspector view should be made visible. For example, if the inspector view is attached using a tab in a browser window, the browser window should be raised and the tab containing the inspector view should be the active one. In both cases, if this signal is not handled, the default implementation calls gtk_window_present() on the current toplevel Gtk.Window of the inspector view.

closed: () => void

Emitted when the inspector page is closed. If you are using your own inspector window, you should connect to this signal and destroy your window.

detach: () => boolean | void

Emitted when the inspector is requested to be detached from the window it is currently attached to. The inspector is detached when the inspector page is about to be closed, and this signal is emitted right before WebKit.WebInspector::closed, or when the user clicks on the detach button in the inspector view to show the inspector in a separate window. In this case the signal WebKit.WebInspector.SignalSignatures.open_window | WebKit.WebInspector::open-window is emitted after this one.

To prevent the inspector view from being detached you can connect to this signal and simply return true.

"notify::attached-height": (pspec: GObject.ParamSpec) => void
"notify::can-attach": (pspec: GObject.ParamSpec) => void
"notify::inspected-uri": (pspec: GObject.ParamSpec) => void
"open-window": () => boolean | void

Emitted when the inspector is requested to open in a separate window. If this signal is not handled, a Gtk.Window with the inspector will be created and shown, so you only need to handle this signal if you want to use your own window. This signal is emitted after WebKit.WebInspector::detach to show the inspector in a separate window after being detached.

To prevent the inspector from being shown you can connect to this signal and simply return true

Properties - Inherited from GObject

notify: (arg0: GObject.ParamSpec) => void

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with GObject.ParamFlags.EXPLICIT_NOTIFY, then any call to g_object_set_property() results in ::notify being emitted, even if the new value is the same as the old. If they did pass GObject.ParamFlags.EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.

This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the g_signal_connect() call, like this:

g_signal_connect (text_view->buffer, "notify::paste-target-list",
G_CALLBACK (gtk_text_view_target_list_notify),
text_view)

It is important to note that you must use [canonical parameter names][class@GObject.ParamSpec#parameter-names] as detail strings for the notify signal.