WebView.connectUserMessageReceived

gulong connectUserMessageReceived(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : webkit.user_message.UserMessage))) && (Parameters!T.length < 2 || (ParameterStorageClassTuple!T[1] == ParameterStorageClass.none && is(Parameters!T[1] : webkit.web_view.WebView))) && Parameters!T.length < 3)

Connect to UserMessageReceived signal.

This signal is emitted when a #WebKitUserMessage is received from the #WebKitWebPage corresponding to web_view. You can reply to the message using [webkitwebprocessextension.user_message.UserMessage.sendReply].

You can handle the user message asynchronously by calling [gobject.object.ObjectWrap.ref_] on message and returning true. 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 [webkit.types.UserMessageError.Message].

Parameters

callbacksignal callback delegate or function to connect bool callback(webkit.user_message.UserMessage message, webkit.web_view.WebView webView) message the #WebKitUserMessage received (optional) webView the instance the signal is connected to (optional) Returns true if the message was handled, or false otherwise.
afterYes.After to execute callback after default handler, No.After to execute before (default)

Returns

Signal ID