How to use AddJavaScriptMessageHandler of webview to send message from JavaScript?
c#
try
{
this.control = (T.WebView)this.NativeView;
if (this.control != null)
{
bool bok = this.control.AddJavaScriptMessageHandler("test", new T.JavaScriptMessageHandler(this.OnJavaScriptCall));
System.Diagnostics.Debug.WriteLine(bok);
}
}
catch
{
}
JavaScript:
<script type="text/javascript">
alert(test);
</script>
test is null on Html.... who can help me?