I'm trying to call a C# method using "window.external.notify('my message');" from JavaScript and it doesn't appear to be working. My guess is that I have to add the current window.location a list of allowed domains, but how can I do this in a WPF app? Everything I see online relates to UWP.
private void WebView_ScriptNotify(object sender, WebViewControlScriptNotifyEventArgs e)
{
throw new NotImplementedException();
}
private void WebView_DOMContentLoaded(object sender, WebViewControlDOMContentLoadedEventArgs e)
{
webView.InvokeScript("eval", new string[] {@"window.external.notify('{}');"});
}