Skip to content

Commit

Permalink
Use Invoke function instead InvokeAsync (#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhankoral authored Sep 6, 2024
1 parent ddccb44 commit f1a5a4c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void ExecuteScriptAsyncMethod(string script)
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)
Expand Down

0 comments on commit f1a5a4c

Please sign in to comment.