ICoreWebView2WebMessageReceivedEventArgs

Undocumented in source.
version(Windows && inline_webview2_bindings && all)
interface ICoreWebView2WebMessageReceivedEventArgs : IUnknown {
static const
GUID iid;
}

Members

Functions

TryGetWebMessageAsString
HRESULT TryGetWebMessageAsString(LPWSTR* webMessageAsString)

If the message posted from the WebView content to the host is a string type, this method returns the value of that string. If the message posted is some other kind of JavaScript type this method fails with the following error.

get_Source
HRESULT get_Source(LPWSTR* source)

The URI of the document that sent this web message.

get_WebMessageAsJson
HRESULT get_WebMessageAsJson(LPWSTR* webMessageAsJson)

The message posted from the WebView content to the host converted to a JSON string. Run this operation to communicate using JavaScript objects.

Suggestion Box / Bug Report