Share via


IWidgetProviderMessage Interface

Definition

This optional interface can be implemented by a widget provider to receive string messages from the widget's web content that has been posted using the window.chrome.webview.postMessage JavaScript method.

public interface class IWidgetProviderMessage
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.Widgets.WidgetContract, 393216)]
/// [Windows.Foundation.Metadata.Guid(3930964358, 40484, 19253, 165, 239, 169, 245, 223, 114, 214, 172)]
struct IWidgetProviderMessage
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.Widgets.WidgetContract), 393216)]
[Windows.Foundation.Metadata.Guid(3930964358, 40484, 19253, 165, 239, 169, 245, 223, 114, 214, 172)]
public interface IWidgetProviderMessage
Public Interface IWidgetProviderMessage
Attributes

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.

Methods

OnMessageReceived(WidgetMessageReceivedArgs)

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

Applies to