WebView compatibility between RH7 and RH8 with `Eto.Forms`

Picking up on a loose thread:

So, @curtisw is there a backward compatible way to do this? ExecuteScriptAsync() doesn’t seem to exist for the RH7 version of Eto.

For context what’s happening here is the html page starts to navigate to a bogus page with href = 'rhinosignal....' after a user interaction. In Rhino there’s a custom OnLoading() handler written to intercept that, stop navigating (WebViewLoadingEventArgs.Cancel=true), do some stuff and finally call the ExecuteScript() to reflect certain changes on the html page/UI. Works perfectly fine in RH7 so far. No luck in RH8, as mentioned earlier in the above linked thread.

Hi @Will_Wang,

One thing that might work would be to use Application.Instance.AsyncInvoke(() => ExecuteScript(...)) during the loading event, so it schedules the script to execute on the next message loop.

Another would be to have a different version of your plugin for Rhino 8 which uses ExecuteScriptAsync() instead, which should avoid any deadlock situation.

Hope this helps!