Share via


IWidgetProviderMessage.OnMessageReceived(WidgetMessageReceivedArgs) Method

Definition

Raised when the widget's web content posts a message using the window.chrome.webview.postMessage JavaScript method.

public:
 void OnMessageReceived(WidgetMessageReceivedArgs ^ args);
void OnMessageReceived(WidgetMessageReceivedArgs const& args);
public void OnMessageReceived(WidgetMessageReceivedArgs args);
function onMessageReceived(args)
Public Sub OnMessageReceived (args As WidgetMessageReceivedArgs)

Parameters

args
WidgetMessageReceivedArgs

A WidgetMessageReceivedArgs that provides details about the message that triggered the event.

Remarks

The calls to window.chrome.webview.postMessage in the widget's web content must use a targetOrigin that matches the origin of the widget registration, which is specified in the webUrl field of the adaptive card content.

Applies to