Ahmed Salem

Results 8 comments of Ahmed Salem

Thanks @champnic , I think its absolutely sensible to have a synchronous way of executing web-code as I explained in #2741 , when consumers of webView2 already have code running...

@david-risney @champnic , I just noticed this has been open for 2 years! What does Microsoft suggest as a reliable work around? I now realized the hack that uses the...

We have big framework called OpenSilver http://github.com/opensilver/opensilver and we have what we call a simulator, that allows it to run within a desktop app using a web browser control

Thanks @david-risney, Yes I just tried the second option, but unfortunately it doesn't solve the issue when the call to ExecuteScriptAsync originated from JS runtime through a host object, cause...

an example: `class ABC { public GetBoxText() { return webView2.ExecuteScriptAsync("box.value");} }` `webView2.CoreWebView2.AddHostObjectToScript("abcObj", new ABC()` from JS `anotherBox.value = chrome.webview.hostObjects.abcObj.GetBoxText();` using a `DispatcherFrame` in this scenario seems to terminate the process

this doesn't work ![image](https://user-images.githubusercontent.com/95217221/189412799-9c8f8579-b493-4ec7-aafe-a0a41c305e64.png)

Thanks @david-risney , but come on guys, give me a workaround that works, other embedded web browsers out there do this out of the box. Give me some solution that...

Okay, I finally got things to work for me with wpf+c# . (here is how, incase it help others) Yes, using another thread to wait on (block) while your ExecuteScripAsync...