C
C#2y ago
Avery

❔ WinUI3 WebView2

Hello people, I'm having issues with WebView2. I am trying to ExecuteScriptAsync but it gives me the error "Method was called at an unexpected time". Here's my code:
2 Replies
gerard
gerard2y ago
It's probably because you set the source, the browser starts loading the page and you instantly wants to execute the script; which doesn't work. Maybe you need to register to the event "DOMContentLoaded"?
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?