WebExtension.sendMessageToContext

Send @message to the #WebKitWebContext corresponding to @extension. If @message is floating, it's consumed.

If you don't expect any reply, or you simply want to ignore it, you can pass %NULL as @calback. When the operation is finished, @callback will be called. You can then call webkit_web_extension_send_message_to_context_finish() to get the message reply.

class WebExtension
void
sendMessageToContext
(,
Cancellable cancellable
,
GAsyncReadyCallback callback
,
void* userData
)

Parameters

message UserMessage

a #WebKitUserMessage

cancellable Cancellable

a #GCancellable or %NULL to ignore

callback GAsyncReadyCallback

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

userData void*

the data to pass to callback function

Meta

Since

2.28