Skip to content

Conversation

@LazuliKao
Copy link

@LazuliKao LazuliKao commented Jan 30, 2024

  1. Fixed NavigationStarting and NavigationCompleted events on the Avalonia.WebView.Android (non-Blazor mode).
  2. Implemented IWebViewControl.ExecuteScriptAsync for the Avalonia.WebView.Android.

  1. 修复安卓端(非Blazor模式)无法触发NavigationStartingNavigationCompleted事件的bug
    • Clients\AvaloniaWebViewClient.cs移到Clients\Blazor\AvaloniaBlazorWebViewClient.cs,实现AvaloniaWebViewClient用于非Blazor模式的WebViewClient,相应对应事件
  2. 实现安卓端的 IWebViewControl.ExecuteScriptAsyncTaskCompletionSource转成普通异步。
     var cts = new TaskCompletionSource<string?>();
       _webView.EvaluateJavascript(
           javaScript,
           new JavaScriptValueCallback(result => cts.TrySetResult(result?.ToString()))
       );
       return cts.Task;

@LazuliKao LazuliKao marked this pull request as ready for review January 30, 2024 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant