-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExecuteScriptAsync doesn't return fetch PromiseResult #2295
Comments
Hey @ninoxscutulata - thanks for the bug report, and sorry you are running into this. Unfortunately we don't have great support yet for getting async results from a script using ExecuteScriptAsync. |
An alternative is to use the DevTools protocol to evaluate your JavaScript. WebView2 already has support for this. The relevant DevTools method is https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate If your interested in a ready made library then check out an example #416 (comment) |
Was running into the same problem and solved it by using DevTools protocol method Alternatively you could use the NuGet package |
Are there any chances of getting this reopened? Are Promsies now supported by |
Version
SDK: 1.0.1189-prerelease
Runtime: 99.0.1150.36
Framework: WInForms
OS: Win10
Repro Steps
In the real Chrome or Edge WebBrowser Devtools Console or chrome webdriver, this script works fine.
But it doesn't work in WebView2.
I think that webview2 should also return a string response because I get a successful string response using a different kind of webdriver, but this is just my guess.
Maybe I don't know how to use it
Is there a way to return the response contents using fetch in webview2?
The text was updated successfully, but these errors were encountered: