WebPage.connectUserMessageReceived

Connect to UserMessageReceived signal.

This signal is emitted when a #WebKitUserMessage is received from the #WebKitWebView corresponding to web_page. 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 been replied, the operation in the #WebKitWebView will finish with error webkit.types.UserMessageError.Message.

class WebPage
ulong
connectUserMessageReceived
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == bool)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 3
)

Parameters

callback T

signal callback delegate or function to connect

bool callback(webkitwebprocessextension.user_message.UserMessage message, webkitwebprocessextension.web_page.WebPage webPage)

message the #WebKitUserMessage received (optional)

webPage the instance the signal is connected to (optional)

Returns true if the message was handled, or false otherwise.

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID