Use Invoke function instead InvokeAsync (#223)

This commit is contained in:
Oğuzhan Koral
2024-09-06 13:34:22 +03:00
committed by GitHub
parent ddccb44341
commit f1a5a4cbfe
@@ -33,7 +33,7 @@ public sealed partial class DUI3ControlWebView : UserControl, IBrowserScriptExec
throw new InvalidOperationException("Failed to execute script, Webview2 is not initialized yet.");
}
Browser.Dispatcher.InvokeAsync(() => Browser.ExecuteScriptAsync(script), DispatcherPriority.Background);
Browser.Dispatcher.Invoke(() => Browser.ExecuteScriptAsync(script), DispatcherPriority.Background);
}
private void OnInitialized(object? sender, CoreWebView2InitializationCompletedEventArgs e)