1.45 <WebKitWebView>

Class: <WebKitWebView>

It derives from <WebKitWebViewBase>.

The central class of the WPE WebKit and WebKitGTK APIs.

<WebKitWebView> is the central class of the WPE WebKit and WebKitGTK APIs. It is responsible for managing the drawing of the content and forwarding of events. You can load any URI into the <WebKitWebView> or a data string. With <WebKitSettings> you can control various aspects of the rendering and loading of the content.

Note that in WebKitGTK, <WebKitWebView> is scrollable by itself, so you don’t need to embed it in a <GtkScrolledWindow>.

Fields

parent-instance
priv

Properties

Property: web-view:automation-presentation-type self

The <WebKitAutomationBrowsingContextPresentation> of <WebKitWebView>. This should only be used when creating a new <WebKitWebView> as a response to automation-session:create-web-view signal request. If the new WebView was added to a new tab of current browsing context window tab should be used.

Its value is a <WebKitAutomationBrowsingContextPresentation> (or, to set it, one of its symbols).

It can only be set when the object is made, with #:automation-presentation-type.

Property: web-view:camera-capture-state self

Capture state of the camera device. Whenever the user grants a media-request sent by the web page, requesting video capture capabilities (navigator.mediaDevices.getUserMedia({video: true})) this property will be set to active.

The application can monitor this property and provide a visual indicator allowing to optionally deactivate or mute the capture device by setting this property respectively to none or muted.

If the capture state of the device is set to none the web-page can still re-request the permission to the user. Permission desision caching is left to the application.

Its value is a <WebKitMediaCaptureState> (or, to set it, one of its symbols).

Set it with (set! (web-view:camera-capture-state self) value).

Property: web-view:default-content-security-policy self

The default Content-Security-Policy used by the webview as if it were set by an HTTP header.

This applies to all content loaded including through navigation or via the various webkit_web_view_load_\* APIs. However do note that many WebKit APIs bypass Content-Security-Policy in general such as <WebKitUserContentManager> and webkit_web_view_run_javascript().

Policies are additive so if a website sets its own policy it still applies on top of the policy set here.

Its value is a string, or #f.

It can only be set when the object is made, with #:default-content-security-policy.

Property: web-view:display-capture-state self

Capture state of the display device. Whenever the user grants a media-request sent by the web page, requesting screencasting capabilities (‘navigator.mediaDevices.getDisplayMedia() this property will be set to active.

The application can monitor this property and provide a visual indicator allowing to optionally deactivate or mute the capture device by setting this property respectively to none or muted.

If the capture state of the device is set to none the web-page can still re-request the permission to the user. Permission desision caching is left to the application.

Its value is a <WebKitMediaCaptureState> (or, to set it, one of its symbols).

Set it with (set! (web-view:display-capture-state self) value).

Property: web-view:editable self

Whether the pages loaded inside <WebKitWebView> are editable. For more information see web-view:set-editable.

Its value is a boolean.

Set it with (set! (web-view:editable self) value).

Property: web-view:estimated-load-progress self

An estimate of the percent completion for the current loading operation. This value will range from 0.0 to 1.0 and, once a load completes, will remain at 1.0 until a new load starts, at which point it will be reset to 0.0. The value is an estimate based on the total number of bytes expected to be received for a document, including all its possible subresources and child documents.

Its value is a real number.

It is read only.

Property: web-view:favicon self

The favicon currently associated to the <WebKitWebView>. See web-view:get-favicon for more details.

Its value is a <GdkTexture>, or #f.

It is read only.

Property: web-view:is-controlled-by-automation self

Whether the <WebKitWebView> is controlled by automation tools (e.g. WebDriver, Selenium). This is required for views returned as a response to automation-session:create-web-view signal, alongside any view you want to control during an automation session.

As a construct-only, you need to set it during construction and it can’t be modified.

If web-view:related-view is also passed during construction, web-view:is-controlled-by-automation ignores its own parameter and inherits directly from the related view web-view:is-controlled-by-automation property. This is the recommended way when creating new views as a response to the web-view:create signal. For example, as response to JavaScript window.open() calls during an automation session.

Its value is a boolean.

It can only be set when the object is made, with #:is-controlled-by-automation.

Property: web-view:is-immersive-mode-enabled self

Whether the <WebKitWebView> is in immersive mode.

Its value is a boolean.

It is read only.

Property: web-view:is-loading self

Whether the <WebKitWebView> is currently loading a page. This property becomes #t as soon as a new load operation is requested and before the web-view:load-changed signal is emitted with started and at that point the active URI is the requested one. When the load operation finishes the property is set to #f before web-view:load-changed is emitted with finished.

Its value is a boolean.

It is read only.

Property: web-view:is-muted self

Whether the <WebKitWebView> audio is muted. When #t, audio is silenced. It may still be playing, i.e. web-view:is-playing-audio may be #t.

Its value is a boolean.

Set it with (set! (web-view:is-muted self) value).

Property: web-view:is-playing-audio self

Whether the <WebKitWebView> is currently playing audio from a page. This property becomes #t as soon as web content starts playing any kind of audio. When a page is no longer playing any kind of sound, the property is set back to #f.

Its value is a boolean.

It is read only.

Property: web-view:is-web-process-responsive self

Whether the web process currently associated to the <WebKitWebView> is responsive.

Its value is a boolean.

It is read only.

Property: web-view:microphone-capture-state self

Capture state of the microphone device. Whenever the user grants a media-request sent by the web page, requesting audio capture capabilities (navigator.mediaDevices.getUserMedia({audio: true})) this property will be set to active.

The application can monitor this property and provide a visual indicator allowing to optionally deactivate or mute the capture device by setting this property respectively to none or muted.

If the capture state of the device is set to none the web-page can still re-request the permission to the user. Permission desision caching is left to the application.

Its value is a <WebKitMediaCaptureState> (or, to set it, one of its symbols).

Set it with (set! (web-view:microphone-capture-state self) value).

Property: web-view:network-session self

The <WebKitNetworkSession> of the view

Its value is a <WebKitNetworkSession>, or #f.

It can only be set when the object is made, with #:network-session.

Property: web-view:page-id self

The identifier of the WebKitWebPage corresponding to the <WebKitWebView>.

Its value is an unsigned 64-bit integer.

It is read only.

Property: web-view:related-view self

The related <WebKitWebView> used when creating the view to share the same web process and network session. This property is not readable because the related web view is only valid during the object construction.

Its value is a <WebKitWebView>, or #f.

It can only be set when the object is made, with #:related-view. It cannot be read.

Property: web-view:settings self

The <WebKitSettings> of the view.

Its value is a <WebKitSettings>, or #f.

It can only be set, with (set! (web-view:settings self) value).

Property: web-view:theme-color self

The theme color of the WebView’s current page.

Its value is a <GdkRGBA>, or #f.

It is read only.

Property: web-view:title self

The main frame document title of this <WebKitWebView>. If the title has not been received yet, it will be #f.

Its value is a string, or #f.

It is read only.

Property: web-view:uri self

The current active URI of the <WebKitWebView>. See web-view:get-uri for more details.

Its value is a string, or #f.

It is read only.

Property: web-view:user-content-manager self

The <WebKitUserContentManager> of the view.

Its value is a <WebKitUserContentManager>, or #f.

It can only be set when the object is made, with #:user-content-manager.

Property: web-view:web-context self

The <WebKitWebContext> of the view.

Its value is a <WebKitWebContext>, or #f.

It can only be set when the object is made, with #:web-context.

Property: web-view:web-extension-mode self

This configures web-view to treat the content as a WebExtension.

Note that this refers to the web standard WebExtensions and not WebKitWebExtensions.

In practice this limits the Content-Security-Policies that are allowed to be set. Some details can be found in Chrome’s documentation.

Its value is a <WebKitWebExtensionMode> (or, to set it, one of its symbols).

It can only be set when the object is made, with #:web-extension-mode.

Property: web-view:website-policies self

The <WebKitWebsitePolicies> for the view.

Its value is a <WebKitWebsitePolicies>, or #f.

It can only be set when the object is made, with #:website-policies.

Property: web-view:zoom-level self

The zoom level of the <WebKitWebView> content. See web-view:set-zoom-level for more details.

Its value is a real number.

Set it with (set! (web-view:zoom-level self) value).

Procedures

Method: web-view:call-async-javascript-function self body length [arguments] [world-name] [source-uri] [cancellable] [callback]
Method: call-async-javascript-function self body length [arguments] [world-name] [source-uri] [cancellable] [callback]

Asynchronously call body with arguments in the script world with name world-name of the main frame current context in self. The arguments values must be one of the following types, or contain only the following GVariant types: number, string and dictionary. The result of the operation can be a Promise that will be properly passed to the callback. If world-name is #f, the default world is used. Any value that is not #f is a distin ct world. The source-uri will be shown in exceptions and doesn’t affect the behavior of the script. When not provided, the document URL is used.

Note that if settings:enable-javascript is #f, this method will do nothing. If you want to use this method but still prevent web content from executing its own JavaScript, then use settings:enable-javascript-markup.

When the operation is finished, callback will be called. You can then call web-view:call-async-javascript-function-finish to get the result of the operation.

This is an example that shows how to pass arguments to a JS function that returns a Promise that resolves with the passed argument:

static void
web_view_javascript_finished (GObject      *object,
                              GAsyncResult *result,
                              gpointer      user_data)
{
    JSCValue               *value;
    GError                 *error = NULL;

    value = webkit_web_view_call_async_javascript_function_finish (WEBKIT_WEB_VIEW (object), result, &error);
    if (!value) {
        g_warning ("Error running javascript: %s", error->message);
        g_error_free (error);
        return;
    }

    if (jsc_value_is_number (value)) {
        gint32        int_value = jsc_value_to_string (value);
        JSCException *exception = jsc_context_get_exception (jsc_value_get_context (value));
        if (exception)
            g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
        else
            g_print ("Script result: %d\n", int_value);
        g_free (str_value);
    } else {
        g_warning ("Error running javascript: unexpected return value");
    }
    g_object_unref (value);
}

static void
web_view_evaluate_promise (WebKitWebView *web_view)
{
    GVariantDict dict;
    g_variant_dict_init (&dict, NULL);
    g_variant_dict_insert (&dict, "count", "u", 42);
    GVariant *args = g_variant_dict_end (&dict);
    const gchar *body = "return new Promise((resolve) => { resolve(count); });";
    webkit_web_view_call_async_javascript_function (web_view, body, -1, arguments, NULL, NULL, NULL, web_view_javascript_finished, NULL);
}
self

Passed: a <WebKitWebView>.

a <WebKitWebView>

body

Passed: a string.

the function body

length

Passed: a 64-bit integer.

length of body, or -1 if body is a nul-terminated string

arguments

Passed, or left out: a <GVariant>, or #f.

a <GVariant> with format a{sv} storing the function arguments, or #f

world-name

Passed, or left out: a string, or #f.

the name of a WebKitScriptWorld or #f to use the default

source-uri

Passed, or left out: a string, or #f.

the source URI

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable> or #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the script finished

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: web-view:call-async-javascript-function-finish self result ⇒ %return
Method: call-async-javascript-function-finish self result ⇒ %return

Finish an asynchronous operation started with web-view:call-async-javascript-function.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a <JSCValue>.

a <JSCValue> with the return value of the async function or #f in case of error

Method: web-view:can-execute-editing-command self command [cancellable] [callback]
Method: can-execute-editing-command self command [cancellable] [callback]

Asynchronously check if it is possible to execute the given editing command.

When the operation is finished, callback will be called. You can then call web-view:can-execute-editing-command-finish? to get the result of the operation.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

command

Passed: a string.

the command to check

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable> or #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the request is satisfied

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: web-view:can-execute-editing-command-finish? self result ⇒ %return
Method: can-execute-editing-command-finish? self result ⇒ %return

Finish an asynchronous operation started with web-view:can-execute-editing-command.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a boolean.

#t if the editing command can be executed or #f otherwise

Method: web-view:can-go-back? self ⇒ %return
Method: can-go-back? self ⇒ %return

Determines whether self has a previous history item.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if able to move back or #f otherwise.

Method: web-view:can-go-forward? self ⇒ %return
Method: can-go-forward? self ⇒ %return

Determines whether self has a next history item.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if able to move forward or #f otherwise.

Method: web-view:can-show-mime-type? self mime-type ⇒ %return
Method: can-show-mime-type? self mime-type ⇒ %return

Whether or not a MIME type can be displayed in self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

mime-type

Passed: a string.

a MIME type

%return

Returned: a boolean.

#t if the MIME type mime-type can be displayed or #f otherwise

Method: web-view:download-uri self uri ⇒ %return
Method: download-uri self uri ⇒ %return

Requests downloading of the specified URI string for self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

uri

Passed: a string.

the URI to download

%return

Returned: a <WebKitDownload>.

a new <WebKitDownload> representing the download operation.

Method: web-view:evaluate-javascript self script length [world-name] [source-uri] [cancellable] [callback]
Method: evaluate-javascript self script length [world-name] [source-uri] [cancellable] [callback]

Asynchronously evaluate script in the script world with name world-name of the main frame current context in self. If world-name is #f, the default world is used. Any value that is not #f is a distinct world. The source-uri will be shown in exceptions and doesn’t affect the behavior of the script. When not provided, the document URL is used.

Note that if settings:enable-javascript is #f, this method will do nothing. If you want to use this method but still prevent web content from executing its own JavaScript, then use settings:enable-javascript-markup.

When the operation is finished, callback will be called. You can then call web-view:evaluate-javascript-finish to get the result of the operation.

This is an example of using web-view:evaluate-javascript with a script returning a string:

static void
web_view_javascript_finished (GObject      *object,
                              GAsyncResult *result,
                              gpointer      user_data)
{
    JSCValue               *value;
    GError                 *error = NULL;

    value = webkit_web_view_evaluate_javascript_finish (WEBKIT_WEB_VIEW (object), result, &error);
    if (!value) {
        g_warning ("Error running javascript: %s", error->message);
        g_error_free (error);
        return;
    }

    if (jsc_value_is_string (value)) {
        gchar        *str_value = jsc_value_to_string (value);
        JSCException *exception = jsc_context_get_exception (jsc_value_get_context (value));
        if (exception)
            g_warning ("Error running javascript: %s", jsc_exception_get_message (exception));
        else
            g_print ("Script result: %s\n", str_value);
        g_free (str_value);
    } else {
        g_warning ("Error running javascript: unexpected return value");
    }
    g_object_unref (value);
}

static void
web_view_get_link_url (WebKitWebView *web_view,
                       const gchar   *link_id)
{
    gchar *script = g_strdup_printf ("window.document.getElementById('%s').href;", link_id);
    webkit_web_view_evaluate_javascript (web_view, script, -1, NULL, NULL, NULL, web_view_javascript_finished, NULL);
    g_free (script);
}
self

Passed: a <WebKitWebView>.

a <WebKitWebView>

script

Passed: a string.

the script to evaluate

length

Passed: a 64-bit integer.

length of script, or -1 if script is a nul-terminated string

world-name

Passed, or left out: a string, or #f.

the name of a WebKitScriptWorld or #f to use the default

source-uri

Passed, or left out: a string, or #f.

the source URI

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable> or #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the script finished

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: web-view:evaluate-javascript-finish self result ⇒ %return
Method: evaluate-javascript-finish self result ⇒ %return

Finish an asynchronous operation started with web-view:evaluate-javascript.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a <JSCValue>.

a <JSCValue> with the result of the last executed statement in script or #f in case of error

Method: web-view:execute-editing-command self command
Method: execute-editing-command self command

Request to execute the given command for self.

You can use web-view:can-execute-editing-command to check whether it’s possible to execute the command.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

command

Passed: a string.

the command to execute

Method: web-view:execute-editing-command-with-argument self command argument
Method: execute-editing-command-with-argument self command argument

Request to execute the given command with argument for self.

You can use web-view:can-execute-editing-command to check whether it’s possible to execute the command.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

command

Passed: a string.

the command to execute

argument

Passed: a string.

the command argument

Method: web-view:get-automation-presentation-type self ⇒ %return
Method: get-automation-presentation-type self ⇒ %return

Get the presentation type of <WebKitWebView> when created for automation.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitAutomationBrowsingContextPresentation>.

a <WebKitAutomationBrowsingContextPresentation>.

Method: web-view:get-back-forward-list self ⇒ %return
Method: get-back-forward-list self ⇒ %return

Obtains the <WebKitBackForwardList> associated with the given <WebKitWebView>.

The <WebKitBackForwardList> is owned by the <WebKitWebView>.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitBackForwardList>.

the <WebKitBackForwardList>

Method: web-view:get-background-color! self rgba ⇒ rgba
Method: get-background-color! self rgba ⇒ rgba

Gets the color that is used to draw the self background.

Gets the color that is used to draw the self background before the actual contents are rendered. For more information see also web-view:set-background-color

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

rgba

Passed, filled in, and returned: a <GdkRGBA>.

a <GdkRGBA> to fill in with the background color

Method: web-view:get-camera-capture-state self ⇒ %return
Method: get-camera-capture-state self ⇒ %return

Get the camera capture state of a <WebKitWebView>.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitMediaCaptureState>.

The <WebKitMediaCaptureState> of the camera device. If enable-mediastream is #f, this method will return none.

Method: web-view:get-context self ⇒ %return
Method: get-context self ⇒ %return

Gets the web context of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWebContext>.

the <WebKitWebContext> of the view

Method: web-view:get-custom-charset self ⇒ %return
Method: get-custom-charset self ⇒ %return

Returns the current custom character encoding name of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a string.

the current custom character encoding name or #f if no custom character encoding has been set.

Method: web-view:get-default-content-security-policy self ⇒ %return
Method: get-default-content-security-policy self ⇒ %return

Gets the configured default Content-Security-Policy.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a string, or #f.

The default policy or #f

Method: web-view:get-display-capture-state self ⇒ %return
Method: get-display-capture-state self ⇒ %return

Get the display capture state of a <WebKitWebView>.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitMediaCaptureState>.

The <WebKitMediaCaptureState> of the display device. If enable-mediastream is #f, this method will return none.

Method: web-view:get-editor-state self ⇒ %return
Method: get-editor-state self ⇒ %return

Gets the web editor state of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitEditorState>.

the <WebKitEditorState> of the view

Method: web-view:get-estimated-load-progress self ⇒ %return
Method: get-estimated-load-progress self ⇒ %return

Gets the value of the web-view:estimated-load-progress property.

You can monitor the estimated progress of a load operation by connecting to the notify::estimated-load-progress signal of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a real number.

an estimate of the of the percent complete for a document load as a range from 0.0 to 1.0.

Method: web-view:get-favicon self ⇒ %return
Method: get-favicon self ⇒ %return

Returns favicon currently associated to self.

Returns favicon currently associated to self, if any. You can connect to notify::favicon signal of self to be notified when the favicon is available.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <GdkTexture>.

the favicon image or #f if there’s no icon associated with self.

Method: web-view:get-find-controller self ⇒ %return
Method: get-find-controller self ⇒ %return

Gets the <WebKitFindController>.

Gets the <WebKitFindController> that will allow the caller to query the <WebKitWebView> for the text to look for.

self

Passed: a <WebKitWebView>.

the <WebKitWebView>

%return

Returned: a <WebKitFindController>.

the <WebKitFindController> associated to this particular <WebKitWebView>.

Method: web-view:get-input-method-context self ⇒ %return
Method: get-input-method-context self ⇒ %return

Get the <WebKitInputMethodContext> currently in use by self.

Get the <WebKitInputMethodContext> currently in use by self, or #f if no input method is being used.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitInputMethodContext>, or #f.

a <WebKitInputMethodContext>, or #f

Method: web-view:get-inspector self ⇒ %return
Method: get-inspector self ⇒ %return

Get the <WebKitWebInspector> associated to self

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWebInspector>.

the <WebKitWebInspector> of self

Method: web-view:get-is-muted? self ⇒ %return
Method: get-is-muted? self ⇒ %return

Gets the mute state of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if self audio is muted or #f is audio is not muted.

Method: web-view:get-is-web-process-responsive? self ⇒ %return
Method: get-is-web-process-responsive? self ⇒ %return

Get whether the current web process of a <WebKitWebView> is responsive.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if the web process attached to self is responsive, or #f otherwise.

Method: web-view:get-main-resource self ⇒ %return
Method: get-main-resource self ⇒ %return

Return the main resource of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWebResource>.

the main <WebKitWebResource> of the view or #f if nothing has been loaded.

Method: web-view:get-microphone-capture-state self ⇒ %return
Method: get-microphone-capture-state self ⇒ %return

Get the microphone capture state of a <WebKitWebView>.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitMediaCaptureState>.

The <WebKitMediaCaptureState> of the microphone device. If enable-mediastream is #f, this method will return none.

Method: web-view:get-network-session self ⇒ %return
Method: get-network-session self ⇒ %return

Get the <WebKitNetworkSession> associated to self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitNetworkSession>.

a <WebKitNetworkSession>

Method: web-view:get-page-id self ⇒ %return
Method: get-page-id self ⇒ %return

Get the identifier of the WebKitWebPage corresponding to the <WebKitWebView>

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: an unsigned 64-bit integer.

the page ID of self.

Method: web-view:get-session-state self ⇒ %return
Method: get-session-state self ⇒ %return

Gets the current session state of self

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWebViewSessionState>.

a <WebKitWebViewSessionState>

Method: web-view:get-settings self ⇒ %return
Method: get-settings self ⇒ %return

Gets the <WebKitSettings> currently applied to self.

If no other <WebKitSettings> have been explicitly applied to self with web-view:set-settings, the default <WebKitSettings> will be returned. This method always returns a valid <WebKitSettings> object. To modify any of the self settings, you can either create a new <WebKitSettings> object with settings:new, setting the desired preferences, and then replace the existing self settings with web-view:set-settings or get the existing self settings and update it directly. <WebKitSettings> objects can be shared by multiple <WebKitWebView><!– –>s, so modifying the settings of a <WebKitWebView> would affect other <WebKitWebView><!– –>s using the same <WebKitSettings>.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitSettings>.

the <WebKitSettings> attached to self

Method: web-view:get-snapshot self region options [cancellable] [callback]
Method: get-snapshot self region options [cancellable] [callback]

Asynchronously retrieves a snapshot of self for region.

options specifies how the snapshot should be rendered.

When the operation is finished, callback will be called. You must call web-view:get-snapshot-finish to get the result of the operation.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

region

Passed: a <WebKitSnapshotRegion>, or one of its symbols.

the <WebKitSnapshotRegion> for this snapshot

options

Passed: a <WebKitSnapshotOptions>, or a list of its symbols, or one of them.

<WebKitSnapshotOptions> for the snapshot

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable>

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

user data

Method: web-view:get-snapshot-finish self result ⇒ %return
Method: get-snapshot-finish self result ⇒ %return

Finishes an asynchronous operation started with web-view:get-snapshot, producing an image of the snapshot using the BGRA8888 pixel format.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a <GdkTexture>.

an image with the retrieved snapshot, or #f in case of error.

Method: web-view:get-theme-color! self rgba ⇒ %return rgba
Method: get-theme-color! self rgba ⇒ %return rgba

Gets the theme color that is specified by the content in the self. If the self doesn’t have a theme color it will fill the rgba with transparent black content.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

rgba

Passed, filled in, and returned: a <GdkRGBA>.

a <GdkRGBA> to fill in with the theme color

%return

Returned: a boolean.

Whether the currently loaded page defines a theme color.

Method: web-view:get-title self ⇒ %return
Method: get-title self ⇒ %return

Gets the value of the web-view:title property.

You can connect to notify::title signal of self to be notified when the title has been received.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a string.

The main frame document title of self.

Method: web-view:get-tls-info self ⇒ %return certificate errors
Method: get-tls-info self ⇒ %return certificate errors

Retrieves the <GTlsCertificate> associated with the main resource of self.

Retrieves the <GTlsCertificate> associated with the main resource of self, and the <GTlsCertificateFlags> showing what problems, if any, have been found with that certificate. If the connection is not HTTPS, this function returns #f. This function should be called after a response has been received from the server, so you can connect to web-view:load-changed and call this function when it’s emitted with committed event.

Note that this function provides no information about the security of the web page if the current <WebKitTLSErrorsPolicy> is ignore, as subresources of the page may be controlled by an attacker. This function may safely be used to determine the security status of the current page only if the current <WebKitTLSErrorsPolicy> is fail, in which case subresources that fail certificate verification will be blocked.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if the self connection uses HTTPS and a response has been received from the server, or #f otherwise.

certificate

Returned: a <GTlsCertificate>.

return location for a <GTlsCertificate>

errors

Returned: a <GTlsCertificateFlags>.

return location for a <GTlsCertificateFlags> the verification status of certificate

Method: web-view:get-uri self ⇒ %return
Method: get-uri self ⇒ %return

Returns the current active URI of self.

The active URI might change during a load operation:

  1. When nothing has been loaded yet on self the active URI is #f.
  2. When a new load operation starts the active URI is the requested URI:
  1. If the load operation was started by web-view:load-uri, the requested URI is the given one.
  2. If the load operation was started by web-view:load-html, the requested URI is "about:blank".
  3. If the load operation was started by web-view:load-alternate-html, the requested URI is content URI provided.
  4. If the load operation was started by web-view:go-back or web-view:go-forward, the requested URI is the original URI of the previous/next item in the <WebKitBackForwardList> of self.
  5. If the load operation was started by web-view:go-to-back-forward-list-item, the requested URI is the opriginal URI of the given <WebKitBackForwardListItem>.
  1. If there is a server redirection during the load operation, the active URI is the redirected URI. When the signal web-view:load-changed is emitted with redirected event, the active URI is already updated to the redirected URI.
  2. When the signal web-view:load-changed is emitted with committed event, the active URI is the final one and it will not change unless a new load operation is started or a navigation action within the same page is performed.

You can monitor the active URI by connecting to the notify::uri signal of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a string.

the current active URI of self or #f if nothing has been loaded yet.

Method: web-view:get-user-content-manager self ⇒ %return
Method: get-user-content-manager self ⇒ %return

Gets the user content manager associated to self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitUserContentManager>.

the <WebKitUserContentManager> associated with the view

Method: web-view:get-web-extension-mode self ⇒ %return
Method: get-web-extension-mode self ⇒ %return

Get the view’s <WebKitWebExtensionMode>.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWebExtensionMode>.

the <WebKitWebExtensionMode>

Method: web-view:get-website-policies self ⇒ %return
Method: get-website-policies self ⇒ %return

Gets the default website policies.

Gets the default website policies set on construction in the self. These can be overridden on a per-origin basis via the web-view:decide-policy signal handler.

See also policy-decision:use-with-policies.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWebsitePolicies>.

the default <WebKitWebsitePolicies> associated with the view.

Method: web-view:get-window-properties self ⇒ %return
Method: get-window-properties self ⇒ %return

Get the <WebKitWindowProperties> object.

Get the <WebKitWindowProperties> object containing the properties that the window containing self should have.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a <WebKitWindowProperties>.

the <WebKitWindowProperties> of self

Method: web-view:get-zoom-level self ⇒ %return
Method: get-zoom-level self ⇒ %return

Set the zoom level of self.

Get the zoom level of self, i.e. the factor by which the view contents are scaled with respect to their original size.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a real number.

the current zoom level of self

Method: web-view:go-back self
Method: go-back self

Loads the previous history item.

You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:go-forward self
Method: go-forward self

Loads the next history item.

You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:go-to-back-forward-list-item self list-item
Method: go-to-back-forward-list-item self list-item

Loads the specific history item list-item.

You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

list-item

Passed: a <WebKitBackForwardListItem>.

a <WebKitBackForwardListItem>

Method: web-view:is-controlled-by-automation? self ⇒ %return
Method: is-controlled-by-automation? self ⇒ %return

Get whether a <WebKitWebView> was created with web-view:is-controlled-by-automation property enabled.

Only <WebKitWebView><!– –>s controlled by automation can be used in an automation session.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if self is controlled by automation, or #f otherwise.

Method: web-view:is-editable? self ⇒ %return
Method: is-editable? self ⇒ %return

Gets whether the user is allowed to edit the HTML document.

When self is not editable an element in the HTML document can only be edited if the CONTENTEDITABLE attribute has been set on the element or one of its parent elements. By default a <WebKitWebView> is not editable.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if the user is allowed to edit the HTML document, or #f otherwise.

Method: web-view:is-immersive-mode-enabled? self ⇒ %return
Method: is-immersive-mode-enabled? self ⇒ %return

Gets whether self is in immersive mode.

An immersive session is a mode in which the user is presented with a fully immersive XR experience (such as VR or AR), typically rendered via a headset.

Note that if WebXR is disabled or OPENXR is not used, this API always returns #f.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if the self is in immersive mode, or #f otherwise.

Method: web-view:is-loading? self ⇒ %return
Method: is-loading? self ⇒ %return

Gets the value of the web-view:is-loading property.

You can monitor when a <WebKitWebView> is loading a page by connecting to notify::is-loading signal of self. This is useful when you are interesting in knowing when the view is loading something but not in the details about the status of the load operation, for example to start a spinner when the view is loading a page and stop it when it finishes.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if self is loading a page or #f otherwise.

Method: web-view:is-playing-audio? self ⇒ %return
Method: is-playing-audio? self ⇒ %return

Gets the value of the web-view:is-playing-audio property.

You can monitor when a page in a <WebKitWebView> is playing audio by connecting to the notify::is-playing-audio signal of self. This is useful when the application wants to provide visual feedback when a page is producing sound.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

%return

Returned: a boolean.

#t if a page in self is playing audio or #f otherwise.

Method: web-view:leave-immersive-mode self
Method: leave-immersive-mode self

Requests to leave the immersive mode this <WebKitWebView> is in.

Users interact with web content to start XR sessions, and can typically end the sessions themselves, but applications might need to end a session on their own based on application or platform logic.

Note that if WebXR is disabled, or if it is enabled but the self is not in immersive mode, this API does nothing. See also web-view:is-immersive-mode-enabled?.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:load-alternate-html self content content-uri [base-uri]
Method: load-alternate-html self content content-uri [base-uri]

Load the given content string for the URI content-uri.

This allows clients to display page-loading errors in the <WebKitWebView> itself. When this method is called from web-view:load-failed signal to show an error page, then the back-forward list is maintained appropriately. For everything else this method works the same way as web-view:load-html.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

content

Passed: a string.

the new content to display as the main page of the self

content-uri

Passed: a string.

the URI for the alternate page content

base-uri

Passed, or left out: a string, or #f.

the base URI for relative locations or #f

Method: web-view:load-bytes self bytes [mime-type] [encoding] [base-uri]
Method: load-bytes self bytes [mime-type] [encoding] [base-uri]

Load the specified bytes into self using the given mime-type and encoding.

When mime-type is #f, it defaults to "text/html". When encoding is #f, it defaults to "UTF-8". When base-uri is #f, it defaults to "about:blank". You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

bytes

Passed: a <GBytes>.

input data to load

mime-type

Passed, or left out: a string, or #f.

the MIME type of bytes, or #f

encoding

Passed, or left out: a string, or #f.

the character encoding of bytes, or #f

base-uri

Passed, or left out: a string, or #f.

the base URI for relative locations or #f

Method: web-view:load-html self content [base-uri]
Method: load-html self content [base-uri]

Load the given content string with the specified base-uri.

If base-uri is not #f, relative URLs in the content will be resolved against base-uri and absolute local paths must be children of the base-uri. For security reasons absolute local paths that are not children of base-uri will cause the web process to terminate. If you need to include URLs in content that are local paths in a different directory than base-uri you can build a data URI for them. When base-uri is #f, it defaults to "about:blank". The mime type of the document will be "text/html". You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

content

Passed: a string.

The HTML string to load

base-uri

Passed, or left out: a string, or #f.

The base URI for relative locations or #f

Method: web-view:load-plain-text self plain-text
Method: load-plain-text self plain-text

Load the specified plain-text string into self.

The mime type of document will be "text/plain". You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

plain-text

Passed: a string.

The plain text to load

Method: web-view:load-request self request
Method: load-request self request

Requests loading of the specified <WebKitURIRequest>.

You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

request

Passed: a <WebKitURIRequest>.

a <WebKitURIRequest> to load

Method: web-view:load-uri self uri
Method: load-uri self uri

Requests loading of the specified URI string.

You can monitor the load operation by connecting to web-view:load-changed signal.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

uri

Passed: a string.

an URI string

Procedure: web-view:new ⇒ %return

Creates a new <WebKitWebView> with the default <WebKitWebContext>.

Creates a new <WebKitWebView> with the default <WebKitWebContext> and no <WebKitUserContentManager> associated with it. See also webkit_web_view_new_with_context(), webkit_web_view_new_with_user_content_manager(), and webkit_web_view_new_with_settings().

%return

Returned: a <GtkWidget>.

The newly created <WebKitWebView> widget

Method: web-view:reload self
Method: reload self

Reloads the current contents of self.

See also web-view:reload-bypass-cache.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:reload-bypass-cache self
Method: reload-bypass-cache self

Reloads the current contents of self without using any cached data.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:restore-session-state self state
Method: restore-session-state self state

Restore the self session state from state

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

state

Passed: a <WebKitWebViewSessionState>.

a <WebKitWebViewSessionState>

Method: web-view:save self save-mode [cancellable] [callback]
Method: save self save-mode [cancellable] [callback]

Asynchronously save the current web page.

Asynchronously save the current web page associated to the <WebKitWebView> into a self-contained format using the mode specified in save-mode.

When the operation is finished, callback will be called. You can then call web-view:save-finish to get the result of the operation.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

save-mode

Passed: a <WebKitSaveMode>, or one of its symbols.

the <WebKitSaveMode> specifying how the web page should be saved.

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable> or #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the request is satisfied

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: web-view:save-finish self result ⇒ %return
Method: save-finish self result ⇒ %return

Finish an asynchronous operation started with web-view:save.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a <GInputStream>.

a <GInputStream> with the result of saving the current web page or #f in case of error.

Method: web-view:save-to-file self file save-mode [cancellable] [callback]
Method: save-to-file self file save-mode [cancellable] [callback]

Asynchronously save the current web page.

Asynchronously save the current web page associated to the <WebKitWebView> into a self-contained format using the mode specified in save-mode and writing it to file.

When the operation is finished, callback will be called. You can then call web-view:save-to-file-finish? to get the result of the operation.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

file

Passed: a <GFile>.

the <GFile> where the current web page should be saved to.

save-mode

Passed: a <WebKitSaveMode>, or one of its symbols.

the <WebKitSaveMode> specifying how the web page should be saved.

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable> or #f to ignore

callback

Passed, or left out: a procedure, or #f.

a GAsyncReadyCallback to call when the request is satisfied

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: web-view:save-to-file-finish? self result ⇒ %return
Method: save-to-file-finish? self result ⇒ %return

Finish an asynchronous operation started with web-view:save-to-file.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a boolean.

#t if the web page was successfully saved to a file or #f otherwise.

Method: web-view:send-message-to-page self message [cancellable] [callback]
Method: send-message-to-page self message [cancellable] [callback]

Send message to the WebKitWebPage corresponding to self.

If message is floating, it’s consumed. If you don’t expect any reply, or you simply want to ignore it, you can pass #f as callback. When the operation is finished, callback will be called. You can then call web-view:send-message-to-page-finish to get the message reply.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

message

Passed: a <WebKitUserMessage>.

a <WebKitUserMessage>

cancellable

Passed, or left out: a <GCancellable>, or #f.

a <GCancellable> or #f to ignore

callback

Passed, or left out: a procedure, or #f.

(nullable): A GAsyncReadyCallback to call when the request is satisfied or #f

See GAsyncReadyCallback for how it is called.

user-data

Not passed: guile-gi supplies it.

the data to pass to callback function

Method: web-view:send-message-to-page-finish self result ⇒ %return
Method: send-message-to-page-finish self result ⇒ %return

Finish an asynchronous operation started with web-view:send-message-to-page.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

result

Passed: a <GAsyncResult>.

a <GAsyncResult>

%return

Returned: a <WebKitUserMessage>.

a <WebKitUserMessage> with the reply or #f in case of error.

Method: web-view:set-background-color self rgba
Method: set-background-color self rgba

Sets the color that will be used to draw the self background.

Sets the color that will be used to draw the self background before the actual contents are rendered. Note that if the web page loaded in self specifies a background color, it will take precedence over the rgba color. By default the self background color is opaque white.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

rgba

Passed: a <GdkRGBA>.

a <GdkRGBA>

Method: web-view:set-camera-capture-state self state
Method: set-camera-capture-state self state

Set the camera capture state of a <WebKitWebView>.

If enable-mediastream is #f, this method will have no visible effect. Once the state of the device has been set to none it cannot be changed anymore. The page can however request capture again using the mediaDevices API.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

state

Passed: a <WebKitMediaCaptureState>, or one of its symbols.

a <WebKitMediaCaptureState>

Method: web-view:set-cors-allowlist self [allowlist]
Method: set-cors-allowlist self [allowlist]

Sets the allowlist for CORS.

Sets the allowlist for which Cross-Origin Resource Sharing checks are disabled in self. URI patterns must be of the form [protocol]://[host]/[path], each component may contain the wildcard character (*) to represent zero or more other characters. All three components are required and must not be omitted from the URI patterns.

Disabling CORS checks permits resources from other origins to load allowlisted resources. It does not permit the allowlisted resources to load resources from other origins.

If this function is called multiple times, only the allowlist set by the most recent call will be effective.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

allowlist

Passed, or left out: a list or vector, each a string, or #f.

an allowlist of URI patterns, or #f

Method: web-view:set-custom-charset self [charset]
Method: set-custom-charset self [charset]

Sets the current custom character encoding override of self.

The custom character encoding will override any text encoding detected via HTTP headers or META tags. Calling this method will stop any current load operation and reload the current page. Setting the custom character encoding to #f removes the character encoding override.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

charset

Passed, or left out: a string, or #f.

a character encoding name or #f

Method: web-view:set-display-capture-state self state
Method: set-display-capture-state self state

Set the display capture state of a <WebKitWebView>.

If enable-mediastream is #f, this method will have no visible effect. Once the state of the device has been set to none it cannot be changed anymore. The page can however request capture again using the mediaDevices API.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

state

Passed: a <WebKitMediaCaptureState>, or one of its symbols.

a <WebKitMediaCaptureState>

Method: web-view:set-editable self editable
Method: set-editable self editable

Sets whether the user is allowed to edit the HTML document.

If editable is #t, self allows the user to edit the HTML document. If editable is #f, an element in self’s document can only be edited if the CONTENTEDITABLE attribute has been set on the element or one of its parent elements. By default a <WebKitWebView> is not editable.

Normally, a HTML document is not editable unless the elements within the document are editable. This function provides a way to make the contents of a <WebKitWebView> editable without altering the document or DOM structure.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

editable

Passed: a boolean.

a gboolean indicating the editable state

Method: web-view:set-input-method-context self [context]
Method: set-input-method-context self [context]

Set the <WebKitInputMethodContext> to be used by self.

Set the <WebKitInputMethodContext> to be used by self, or #f to not use any input method. Note that the same <WebKitInputMethodContext> can’t be set on more than one <WebKitWebView> at the same time.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

context

Passed, or left out: a <WebKitInputMethodContext>, or #f.

the <WebKitInputMethodContext> to set, or #f

Method: web-view:set-is-muted self muted
Method: set-is-muted self muted

Sets the mute state of self.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

muted

Passed: a boolean.

mute flag

Method: web-view:set-microphone-capture-state self state
Method: set-microphone-capture-state self state

Set the microphone capture state of a <WebKitWebView>.

If enable-mediastream is #f, this method will have no visible effect. Once the state of the device has been set to none it cannot be changed anymore. The page can however request capture again using the mediaDevices API.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

state

Passed: a <WebKitMediaCaptureState>, or one of its symbols.

a <WebKitMediaCaptureState>

Method: web-view:set-settings self settings
Method: set-settings self settings

Sets the <WebKitSettings> to be applied to self.

The existing <WebKitSettings> of self will be replaced by settings. New settings are applied immediately on self. The same <WebKitSettings> object can be shared by multiple <WebKitWebView><!– –>s.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

settings

Passed: a <WebKitSettings>.

a <WebKitSettings>

Method: web-view:set-zoom-level self zoom-level
Method: set-zoom-level self zoom-level

Set the zoom level of self.

Set the zoom level of self, i.e. the factor by which the view contents are scaled with respect to their original size.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

zoom-level

Passed: a real number.

the zoom level

Method: web-view:stop-loading self
Method: stop-loading self

Stops any ongoing loading operation in self.

This method does nothing if no content is being loaded. If there is a loading operation in progress, it will be cancelled and web-view:load-failed signal will be emitted with cancelled error.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:terminate-web-process self
Method: terminate-web-process self

Terminates the web process associated to self.

When the web process gets terminated using this method, the web-view:web-process-terminated signal is emitted with terminated-by-api as the reason for termination.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Method: web-view:try-close self
Method: try-close self

Tries to close the self.

This will fire the onbeforeunload event to ask the user for confirmation to close the page. If there isn’t an onbeforeunload event handler or the user confirms to close the page, the web-view:close signal is emitted, otherwise nothing happens.

self

Passed: a <WebKitWebView>.

a <WebKitWebView>

Signals

Signal: web-view:authenticate

Connect a handler with (connect object web-view:authenticate handler). It is called as (handler self request) ⇒ %return.

This signal is emitted when the user is challenged with HTTP authentication. To let the application access or supply the credentials as well as to allow the client application to either cancel the request or perform the authentication, the signal will pass an instance of the <WebKitAuthenticationRequest> in the request argument. To handle this signal asynchronously you should keep a ref of the request and return #t. To disable HTTP authentication entirely, connect to this signal and simply return #t.

The default signal handler will run a default authentication dialog asynchronously for the user to interact with.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitAuthenticationRequest>.

a <WebKitAuthenticationRequest>

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:close

Connect a handler with (connect object web-view:close handler). It is called as (handler self).

Emitted when closing a <WebKitWebView> is requested. This occurs when a call is made from JavaScript’s window.close() function or after trying to close the web-view with web-view:try-close. It is the owner’s responsibility to handle this signal to hide or destroy the <WebKitWebView>, if necessary.

self

Passed: a <WebKitWebView>.

Signal: web-view:context-menu

Connect a handler with (connect object web-view:context-menu handler). It is called as (handler self context-menu hit-test-result) ⇒ %return.

Emitted when a context menu is about to be displayed to give the application a chance to customize the proposed menu, prevent the menu from being displayed, or build its own context menu.

  • To customize the proposed menu you can use context-menu:prepend, context-menu:append or context-menu:insert to add new <WebKitContextMenuItem><!– –>s to context-menu, context-menu:move-item to reorder existing items, or context-menu:remove to remove an existing item. The signal handler should return #f, and the menu represented by context-menu will be shown.
  • To prevent the menu from being displayed you can just connect to this signal and return #t so that the proposed menu will not be shown.
  • To build your own menu, you can remove all items from the proposed menu with context-menu:remove-all, add your own items and return #f so that the menu will be shown. You can also ignore the proposed <WebKitContextMenu>, build your own GtkMenu and return #t to prevent the proposed menu from being shown.
  • If you just want the default menu to be shown always, simply don’t connect to this signal because showing the proposed context menu is the default behaviour.

If the signal handler returns #f the context menu represented by context-menu will be shown, if it return #t the context menu will not be shown.

The proposed <WebKitContextMenu> passed in context-menu argument is only valid during the signal emission.

self

Passed: a <WebKitWebView>.

context-menu

Passed: a <WebKitContextMenu>.

the proposed <WebKitContextMenu>

hit-test-result

Passed: a <WebKitHitTestResult>.

a <WebKitHitTestResult>

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:context-menu-dismissed

Connect a handler with (connect object web-view:context-menu-dismissed handler). It is called as (handler self).

Emitted after web-view:context-menu signal, if the context menu is shown, to notify that the context menu is dismissed.

self

Passed: a <WebKitWebView>.

Signal: web-view:create

Connect a handler with (connect object web-view:create handler). It is called as (handler self navigation-action) ⇒ %return.

Emitted when the creation of a new <WebKitWebView> is requested. If this signal is handled the signal handler should return the newly created <WebKitWebView>.

The <WebKitNavigationAction> parameter contains information about the navigation action that triggered this signal.

The new <WebKitWebView> must be related to web-view, see web-view:related-view for more details.

The new <WebKitWebView> should not be displayed to the user until the web-view:ready-to-show signal is emitted.

For creating views as response to automation tools requests, see the automation-session:create-web-view signal.

self

Passed: a <WebKitWebView>.

navigation-action

Passed: a <WebKitNavigationAction>.

a <WebKitNavigationAction>

%return

Returned: a <GtkWidget>.

a newly allocated <WebKitWebView> widget or #f to propagate the event further.

Signal: web-view:decide-policy

Connect a handler with (connect object web-view:decide-policy handler). It is called as (handler self decision decision-type) ⇒ %return.

This signal is emitted when WebKit is requesting the client to decide a policy decision, such as whether to navigate to a page, open a new window or whether or not to download a resource. The <WebKitNavigationPolicyDecision> passed in the decision argument is a generic type, but should be casted to a more specific type when making the decision. For example:

static gboolean
decide_policy_cb (WebKitWebView *web_view,
                  WebKitPolicyDecision *decision,
                  WebKitPolicyDecisionType type)
{
    switch (type) {
    case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: {
        WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
        // Make a policy decision here
        break;
    }
    case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION: {
        WebKitNavigationPolicyDecision *navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
        // Make a policy decision here
        break;
    }
    case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
        WebKitResponsePolicyDecision *response = WEBKIT_RESPONSE_POLICY_DECISION (decision);
        // Make a policy decision here
        break;
    default:
        // Making no decision results in webkit_policy_decision_use()
        return FALSE;
    }
    return TRUE;
}

It is possible to make policy decision asynchronously, by simply calling object:ref on the decision argument and returning #t to block the default signal handler. If the last reference is removed on a <WebKitPolicyDecision> and no decision has been made explicitly, policy-decision:use will be the default policy decision. The default signal handler will simply call policy-decision:use. Only the first policy decision chosen for a given <WebKitPolicyDecision> will have any affect.

self

Passed: a <WebKitWebView>.

decision

Passed: a <WebKitPolicyDecision>.

the <WebKitPolicyDecision>

decision-type

Passed: a <WebKitPolicyDecisionType>.

a <WebKitPolicyDecisionType> denoting the type of decision

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:enter-fullscreen

Connect a handler with (connect object web-view:enter-fullscreen handler). It is called as (handler self) ⇒ %return.

Emitted when JavaScript code calls element.webkitRequestFullScreen(). If the signal is not handled the <WebKitWebView> will proceed to full screen its top level window. This signal can be used by client code to request permission to the user prior doing the full screen transition and eventually prepare the top-level window (e.g. hide some widgets that would otherwise be part of the full screen window).

self

Passed: a <WebKitWebView>.

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to continue emission of the event.

Signal: web-view:insecure-content-detected

Connect a handler with (connect object web-view:insecure-content-detected handler). It is called as (handler self event).

Prior to 2.46, this signal was emitted when insecure content was loaded in a secure content. Since 2.46, this signal is generally no longer emitted.

self

Passed: a <WebKitWebView>.

event

Passed: a <WebKitInsecureContentEvent>.

the WebKitInsecureContentEvent

Signal: web-view:leave-fullscreen

Connect a handler with (connect object web-view:leave-fullscreen handler). It is called as (handler self) ⇒ %return.

Emitted when the <WebKitWebView> is about to restore its top level window out of its full screen state. This signal can be used by client code to restore widgets hidden during the web-view:enter-fullscreen stage for instance.

self

Passed: a <WebKitWebView>.

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to continue emission of the event.

Signal: web-view:load-changed

Connect a handler with (connect object web-view:load-changed handler). It is called as (handler self load-event).

Emitted when a load operation in web-view changes. The signal is always emitted with started when a new load request is made and finished when the load finishes successfully or due to an error. When the ongoing load operation fails web-view:load-failed signal is emitted before web-view:load-changed is emitted with finished. If a redirection is received from the server, this signal is emitted with redirected after the initial emission with started and before committed. When the page content starts arriving the signal is emitted with committed event.

You can handle this signal and use a switch to track any ongoing load operation.

static void web_view_load_changed (WebKitWebView  *web_view,
                                   WebKitLoadEvent load_event,
                                   gpointer        user_data)
{
    switch (load_event) {
    case WEBKIT_LOAD_STARTED:
        // New load, we have now a provisional URI
        provisional_uri = webkit_web_view_get_uri (web_view);
        // Here we could start a spinner or update the
        // location bar with the provisional URI
        break;
    case WEBKIT_LOAD_REDIRECTED:
        redirected_uri = webkit_web_view_get_uri (web_view);
        break;
    case WEBKIT_LOAD_COMMITTED:
        // The load is being performed. Current URI is
        // the final one and it won't change unless a new
        // load is requested or a navigation within the
        // same page is performed
        uri = webkit_web_view_get_uri (web_view);
        break;
    case WEBKIT_LOAD_FINISHED:
        // Load finished, we can now stop the spinner
        break;
    }
}
self

Passed: a <WebKitWebView>.

load-event

Passed: a <WebKitLoadEvent>.

the <WebKitLoadEvent>

Signal: web-view:load-failed

Connect a handler with (connect object web-view:load-failed handler). It is called as (handler self load-event failing-uri error) ⇒ %return.

Emitted when an error occurs during a load operation. If the error happened when starting to load data for a page load-event will be started. If it happened while loading a committed data source load-event will be committed. Since a load error causes the load operation to finish, the signal WebKitWebView::load-changed will always be emitted with finished event right after this one.

By default, if the signal is not handled, a stock error page will be displayed. You need to handle the signal if you want to provide your own error page.

self

Passed: a <WebKitWebView>.

load-event

Passed: a <WebKitLoadEvent>.

the <WebKitLoadEvent> of the load operation

failing-uri

Passed: a string.

the URI that failed to load

error

Passed: a <GError>.

the <GError> that was triggered

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:load-failed-with-tls-errors

Connect a handler with (connect object web-view:load-failed-with-tls-errors handler). It is called as (handler self failing-uri certificate errors) ⇒ %return.

Emitted when a TLS error occurs during a load operation. To allow an exception for this certificate and the host of failing-uri use webkit_web_context_allow_tls_certificate_for_host().

To handle this signal asynchronously you should call object:ref on certificate and return #t.

If #f is returned, web-view:load-failed will be emitted. The load will finish regardless of the returned value.

self

Passed: a <WebKitWebView>.

failing-uri

Passed: a string.

the URI that failed to load

certificate

Passed: a <GTlsCertificate>.

a <GTlsCertificate>

errors

Passed: a <GTlsCertificateFlags>.

a <GTlsCertificateFlags> with the verification status of certificate

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:mouse-target-changed

Connect a handler with (connect object web-view:mouse-target-changed handler). It is called as (handler self hit-test-result modifiers).

This signal is emitted when the mouse cursor moves over an element such as a link, image or a media element. To determine what type of element the mouse cursor is over, a Hit Test is performed on the current mouse coordinates and the result is passed in the hit-test-result argument. The modifiers argument is a bitmask of <GdkModifierType> flags indicating the state of modifier keys. The signal is emitted again when the mouse is moved out of the current element with a new hit-test-result.

self

Passed: a <WebKitWebView>.

hit-test-result

Passed: a <WebKitHitTestResult>.

a <WebKitHitTestResult>

modifiers

Passed: an unsigned 32-bit integer.

a bitmask of <GdkModifierType>

Signal: web-view:permission-request

Connect a handler with (connect object web-view:permission-request handler). It is called as (handler self request) ⇒ %return.

This signal is emitted when WebKit is requesting the client to decide about a permission request, such as allowing the browser to switch to fullscreen mode, sharing its location or similar operations.

A possible way to use this signal could be through a dialog allowing the user decide what to do with the request:

static gboolean permission_request_cb (WebKitWebView *web_view,
                                       WebKitPermissionRequest *request,
                                       GtkWindow *parent_window)
{
    GtkWidget *dialog = gtk_message_dialog_new (parent_window,
                                                GTK_DIALOG_MODAL,
                                                GTK_MESSAGE_QUESTION,
                                                GTK_BUTTONS_YES_NO,
                                                "Allow Permission Request?");
    gtk_widget_show (dialog);
    gint result = gtk_dialog_run (GTK_DIALOG (dialog));

    switch (result) {
    case GTK_RESPONSE_YES:
        webkit_permission_request_allow (request);
        break;
    default:
        webkit_permission_request_deny (request);
        break;
    }
    gtk_widget_destroy (dialog);

    return TRUE;
}

It is possible to handle permission requests asynchronously, by simply calling object:ref on the request argument and returning #t to block the default signal handler. If the last reference is removed on a <WebKitPermissionRequest> and the request has not been handled, permission-request:deny will be the default action.

If the signal is not handled, the request will be completed automatically by the specific <WebKitPermissionRequest> that could allow or deny it. Check the documentation of classes implementing <WebKitPermissionRequest> interface to know their default action.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitPermissionRequest>.

the <WebKitPermissionRequest>

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:print

Connect a handler with (connect object web-view:print handler). It is called as (handler self print-operation) ⇒ %return.

Emitted when printing is requested on web-view, usually by a JavaScript call, before the print dialog is shown. This signal can be used to set the initial print settings and page setup of print-operation to be used as default values in the print dialog. You can call print-operation:set-print-settings and print-operation:set-page-setup and then return #f to propagate the event so that the print dialog is shown.

You can connect to this signal and return #t to cancel the print operation or implement your own print dialog.

self

Passed: a <WebKitWebView>.

print-operation

Passed: a <WebKitPrintOperation>.

the <WebKitPrintOperation> that will handle the print request

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:query-permission-state

Connect a handler with (connect object web-view:query-permission-state handler). It is called as (handler self query) ⇒ %return.

This signal allows the User-Agent to respond to permission requests for powerful features, as specified by the Permissions W3C Specification. You can reply to the query using permission-state-query:finish.

You can handle the query asynchronously by calling permission-state-query:ref on query and returning #t. If the last reference of query is removed and the query has not been handled, the query result will be set to WEBKIT_QUERY_PERMISSION_PROMPT.

self

Passed: a <WebKitWebView>.

query

Passed: a <WebKitPermissionStateQuery>.

the <WebKitPermissionStateQuery>

%return

Returned: a boolean.

#t if the message was handled, or #f otherwise.

Signal: web-view:ready-to-show

Connect a handler with (connect object web-view:ready-to-show handler). It is called as (handler self).

Emitted after web-view:create on the newly created <WebKitWebView> when it should be displayed to the user. When this signal is emitted all the information about how the window should look, including size, position, whether the location, status and scrollbars should be displayed, is already set on the <WebKitWindowProperties> of web-view. See also web-view:get-window-properties.

self

Passed: a <WebKitWebView>.

Signal: web-view:resource-load-started

Connect a handler with (connect object web-view:resource-load-started handler). It is called as (handler self resource request).

Emitted when a new resource is going to be loaded. The request parameter contains the <WebKitURIRequest> that will be sent to the server. You can monitor the load operation by connecting to the different signals of resource.

self

Passed: a <WebKitWebView>.

resource

Passed: a <WebKitWebResource>.

a <WebKitWebResource>

request

Passed: a <WebKitURIRequest>.

a <WebKitURIRequest>

Signal: web-view:run-as-modal

Connect a handler with (connect object web-view:run-as-modal handler). It is called as (handler self).

Emitted after web-view:ready-to-show on the newly created <WebKitWebView> when JavaScript code calls window.showModalDialog(). The purpose of this signal is to allow the client application to prepare the new view to behave as modal. Once the signal is emitted a new main loop will be run to block user interaction in the parent <WebKitWebView> until the new dialog is closed.

self

Passed: a <WebKitWebView>.

Signal: web-view:run-color-chooser

Connect a handler with (connect object web-view:run-color-chooser handler). It is called as (handler self request) ⇒ %return.

This signal is emitted when the user interacts with a <input type=’color’ /> HTML element, requesting from WebKit to show a dialog to select a color. To let the application know the details of the color chooser, as well as to allow the client application to either cancel the request or perform an actual color selection, the signal will pass an instance of the <WebKitColorChooserRequest> in the request argument.

It is possible to handle this request asynchronously by increasing the reference count of the request.

The default signal handler will asynchronously run a regular GtkColorChooser for the user to interact with.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitColorChooserRequest>.

a <WebKitColorChooserRequest>

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:run-file-chooser

Connect a handler with (connect object web-view:run-file-chooser handler). It is called as (handler self request) ⇒ %return.

This signal is emitted when the user interacts with a <input type=’file’ /> HTML element, requesting from WebKit to show a dialog to select one or more files to be uploaded. To let the application know the details of the file chooser, as well as to allow the client application to either cancel the request or perform an actual selection of files, the signal will pass an instance of the <WebKitFileChooserRequest> in the request argument.

The default signal handler will asynchronously run a regular GtkFileChooserDialog for the user to interact with.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitFileChooserRequest>.

a <WebKitFileChooserRequest>

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:script-dialog

Connect a handler with (connect object web-view:script-dialog handler). It is called as (handler self dialog) ⇒ %return.

Emitted when JavaScript code calls window.alert(), window.confirm() or window.prompt(), or when onbeforeunload() event is fired. The dialog parameter should be used to build the dialog. If the signal is not handled a different dialog will be built and shown depending on the dialog type:

  • alert: message dialog with a single Close button.
  • confirm: message dialog with OK and Cancel buttons.
  • prompt: message dialog with OK and Cancel buttons and a text entry with the default text.
  • before-unload-confirm: message dialog with Stay and Leave buttons.

It is possible to handle the script dialog request asynchronously, by simply caling script-dialog:ref on the dialog argument and calling script-dialog:close when done. If the last reference is removed on a <WebKitScriptDialog> and the dialog has not been closed, script-dialog:close will be called.

self

Passed: a <WebKitWebView>.

dialog

Passed: a <WebKitScriptDialog>.

the <WebKitScriptDialog> to show

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:show-notification

Connect a handler with (connect object web-view:show-notification handler). It is called as (handler self notification) ⇒ %return.

This signal is emitted when a notification should be presented to the user. The notification is kept alive until either: 1) the web page cancels it or 2) a navigation happens.

The default handler will emit a notification using libnotify, if built with support for it.

self

Passed: a <WebKitWebView>.

notification

Passed: a <WebKitNotification>.

a <WebKitNotification>

%return

Returned: a boolean.

#t to stop other handlers from being invoked. #f otherwise.

Signal: web-view:show-option-menu

Connect a handler with (connect object web-view:show-option-menu handler). It is called as (handler self menu rectangle) ⇒ %return.

This signal is emitted when a select element in web-view needs to display a dropdown menu. This signal can be used to show a custom menu, using menu to get the details of all items that should be displayed. The area of the element in the <WebKitWebView> is given as rectangle parameter, it can be used to position the menu. To handle this signal asynchronously you should keep a ref of the menu.

The default signal handler will pop up a GtkMenu.

self

Passed: a <WebKitWebView>.

menu

Passed: a <WebKitOptionMenu>.

the <WebKitOptionMenu>

rectangle

Passed: a <GdkRectangle>.

the option element area

%return

Returned: a boolean.

#t to stop other handlers from being invoked for the event. #f to propagate the event further.

Signal: web-view:submit-form

Connect a handler with (connect object web-view:submit-form handler). It is called as (handler self request).

This signal is emitted when a form is about to be submitted. The request argument passed contains information about the text fields of the form. This is typically used to store login information that can be used later to pre-fill the form. The form will not be submitted until form-submission-request:submit is called.

It is possible to handle the form submission request asynchronously, by simply calling object:ref on the request argument and calling form-submission-request:submit when done to continue with the form submission. If the last reference is removed on a <WebKitFormSubmissionRequest> and the form has not been submitted, form-submission-request:submit will be called.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitFormSubmissionRequest>.

a <WebKitFormSubmissionRequest>

Signal: web-view:user-message-received

Connect a handler with (connect object web-view:user-message-received handler). It is called as (handler self message) ⇒ %return.

This signal is emitted when a <WebKitUserMessage> is received from the WebKitWebPage corresponding to web-view. You can reply to the message using user-message:send-reply.

You can handle the user message asynchronously by calling object:ref on message and returning #t. If the last reference of message is removed and the message has not been replied to, the operation in the WebKitWebPage will finish with error message.

self

Passed: a <WebKitWebView>.

message

Passed: a <WebKitUserMessage>.

the <WebKitUserMessage> received

%return

Returned: a boolean.

#t if the message was handled, or #f otherwise.

Signal: web-view:web-process-terminated

Connect a handler with (connect object web-view:web-process-terminated handler). It is called as (handler self reason).

This signal is emitted when the web process terminates abnormally due to reason.

self

Passed: a <WebKitWebView>.

reason

Passed: a <WebKitWebProcessTerminationReason>.

the a <WebKitWebProcessTerminationReason>

Virtual methods

Virtual method: web-view:do-authenticate implementor self request ⇒ %return

To override it in a new class, give register-type #:vfuncs `((authenticate . ,procedure)). The procedure is called as (procedure self request) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitAuthenticationRequest>.

%return

Returned: a boolean.

Virtual method: web-view:do-close implementor self

To override it in a new class, give register-type #:vfuncs `((close . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

Virtual method: web-view:do-context-menu implementor self context-menu hit-test-result ⇒ %return

To override it in a new class, give register-type #:vfuncs `((context-menu . ,procedure)). The procedure is called as (procedure self context-menu hit-test-result) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

context-menu

Passed: a <WebKitContextMenu>.

hit-test-result

Passed: a <WebKitHitTestResult>.

%return

Returned: a boolean.

Virtual method: web-view:do-context-menu-dismissed implementor self

To override it in a new class, give register-type #:vfuncs `((context-menu-dismissed . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

Virtual method: web-view:do-decide-policy implementor self decision type ⇒ %return

To override it in a new class, give register-type #:vfuncs `((decide-policy . ,procedure)). The procedure is called as (procedure self decision type) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

decision

Passed: a <WebKitPolicyDecision>.

type

Passed: a <WebKitPolicyDecisionType>, or one of its symbols.

%return

Returned: a boolean.

Virtual method: web-view:do-enter-fullscreen implementor self ⇒ %return

To override it in a new class, give register-type #:vfuncs `((enter-fullscreen . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

%return

Returned: a boolean.

Virtual method: web-view:do-insecure-content-detected implementor self event

To override it in a new class, give register-type #:vfuncs `((insecure-content-detected . ,procedure)). The procedure is called as (procedure self event).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

event

Passed: a <WebKitInsecureContentEvent>, or one of its symbols.

Virtual method: web-view:do-leave-fullscreen implementor self ⇒ %return

To override it in a new class, give register-type #:vfuncs `((leave-fullscreen . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

%return

Returned: a boolean.

Virtual method: web-view:do-load-changed implementor self load-event

To override it in a new class, give register-type #:vfuncs `((load-changed . ,procedure)). The procedure is called as (procedure self load-event).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

load-event

Passed: a <WebKitLoadEvent>, or one of its symbols.

Virtual method: web-view:do-load-failed implementor self load-event failing-uri error ⇒ %return

To override it in a new class, give register-type #:vfuncs `((load-failed . ,procedure)). The procedure is called as (procedure self load-event failing-uri error) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

load-event

Passed: a <WebKitLoadEvent>, or one of its symbols.

failing-uri

Passed: a string.

error

Passed: a <GError>.

%return

Returned: a boolean.

Virtual method: web-view:do-load-failed-with-tls-errors implementor self failing-uri certificate errors ⇒ %return

To override it in a new class, give register-type #:vfuncs `((load-failed-with-tls-errors . ,procedure)). The procedure is called as (procedure self failing-uri certificate errors) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

failing-uri

Passed: a string.

certificate

Passed: a <GTlsCertificate>.

errors

Passed: a <GTlsCertificateFlags>, or a list of its symbols, or one of them.

%return

Returned: a boolean.

Virtual method: web-view:do-mouse-target-changed implementor self hit-test-result modifiers

To override it in a new class, give register-type #:vfuncs `((mouse-target-changed . ,procedure)). The procedure is called as (procedure self hit-test-result modifiers).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

hit-test-result

Passed: a <WebKitHitTestResult>.

modifiers

Passed: an unsigned 32-bit integer.

Virtual method: web-view:do-permission-request implementor self permission-request ⇒ %return

To override it in a new class, give register-type #:vfuncs `((permission-request . ,procedure)). The procedure is called as (procedure self permission-request) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

permission-request

Passed: a <WebKitPermissionRequest>.

%return

Returned: a boolean.

Virtual method: web-view:do-print implementor self print-operation ⇒ %return

To override it in a new class, give register-type #:vfuncs `((print . ,procedure)). The procedure is called as (procedure self print-operation) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

print-operation

Passed: a <WebKitPrintOperation>.

%return

Returned: a boolean.

Virtual method: web-view:do-query-permission-state implementor self query ⇒ %return

To override it in a new class, give register-type #:vfuncs `((query-permission-state . ,procedure)). The procedure is called as (procedure self query) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

query

Passed: a <WebKitPermissionStateQuery>.

%return

Returned: a boolean.

Virtual method: web-view:do-ready-to-show implementor self

To override it in a new class, give register-type #:vfuncs `((ready-to-show . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

Virtual method: web-view:do-resource-load-started implementor self resource request

To override it in a new class, give register-type #:vfuncs `((resource-load-started . ,procedure)). The procedure is called as (procedure self resource request).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

resource

Passed: a <WebKitWebResource>.

request

Passed: a <WebKitURIRequest>.

Virtual method: web-view:do-run-as-modal implementor self

To override it in a new class, give register-type #:vfuncs `((run-as-modal . ,procedure)). The procedure is called as (procedure self).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

Virtual method: web-view:do-run-color-chooser implementor self request ⇒ %return

To override it in a new class, give register-type #:vfuncs `((run-color-chooser . ,procedure)). The procedure is called as (procedure self request) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitColorChooserRequest>.

%return

Returned: a boolean.

Virtual method: web-view:do-run-file-chooser implementor self request ⇒ %return

To override it in a new class, give register-type #:vfuncs `((run-file-chooser . ,procedure)). The procedure is called as (procedure self request) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitFileChooserRequest>.

%return

Returned: a boolean.

Virtual method: web-view:do-script-dialog implementor self dialog ⇒ %return

To override it in a new class, give register-type #:vfuncs `((script-dialog . ,procedure)). The procedure is called as (procedure self dialog) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

dialog

Passed: a <WebKitScriptDialog>.

%return

Returned: a boolean.

Virtual method: web-view:do-show-notification implementor self notification ⇒ %return

To override it in a new class, give register-type #:vfuncs `((show-notification . ,procedure)). The procedure is called as (procedure self notification) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

notification

Passed: a <WebKitNotification>.

%return

Returned: a boolean.

Virtual method: web-view:do-show-option-menu implementor self menu rectangle ⇒ %return

To override it in a new class, give register-type #:vfuncs `((show-option-menu . ,procedure)). The procedure is called as (procedure self menu rectangle) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

menu

Passed: a <WebKitOptionMenu>.

rectangle

Passed: a <GdkRectangle>.

%return

Returned: a boolean.

Virtual method: web-view:do-submit-form implementor self request

To override it in a new class, give register-type #:vfuncs `((submit-form . ,procedure)). The procedure is called as (procedure self request).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

request

Passed: a <WebKitFormSubmissionRequest>.

Virtual method: web-view:do-user-message-received implementor self message ⇒ %return

To override it in a new class, give register-type #:vfuncs `((user-message-received . ,procedure)). The procedure is called as (procedure self message) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

message

Passed: a <WebKitUserMessage>.

%return

Returned: a boolean.

Virtual method: web-view:do-web-process-crashed implementor self ⇒ %return

To override it in a new class, give register-type #:vfuncs `((web-process-crashed . ,procedure)). The procedure is called as (procedure self) ⇒ %return.

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

%return

Returned: a boolean.

Virtual method: web-view:do-web-process-terminated implementor self reason

To override it in a new class, give register-type #:vfuncs `((web-process-terminated . ,procedure)). The procedure is called as (procedure self reason).

implementor

Passed: the class whose implementation to call: <WebKitWebView>, or a class that derives from it, or its GType number.

self

Passed: a <WebKitWebView>.

reason

Passed: a <WebKitWebProcessTerminationReason>, or one of its symbols.