public override string ExecJavascript(string js)
{
// Anything to to with UI has to go on the main thread
nso.InvokeOnMainThread(delegate
{
try
{
// This has a 10 second timeout
JsReturn = _webView.EvaluateJavascript(js);
}
catch
{
JsReturn = null;
}
});
if(JsReturn == null)
{
throw new TimeoutException("Timed out waiting for javascript execution");
}
return JsReturn;
}