Skip to content

Commit

Permalink
Specify return type. (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbritch authored Oct 28, 2024
1 parent dc6d8fe commit a3dd342
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0-rc.1.24431.7" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0-rc.2.24473.5" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private async void OnInvokeJSMethodButtonClicked(object sender, EventArgs e)
double x = 123d;
double y = 321d;

var result = await hybridWebView.InvokeJavaScriptAsync<ComputationResult>(
ComputationResult result = await hybridWebView.InvokeJavaScriptAsync<ComputationResult>(
"AddNumbers", // JavaScript method name
HybridSampleJSContext.Default.ComputationResult, // JSON serialization info for return type
[x, y], // Parameter values
Expand All @@ -40,7 +40,7 @@ private async void OnInvokeAsyncJSMethodButtonClicked(object sender, EventArgs e
{
string statusResult = string.Empty;

var asyncResult = await hybridWebView.InvokeJavaScriptAsync<Dictionary<string, string>>(
Dictionary<string,string> asyncResult = await hybridWebView.InvokeJavaScriptAsync<Dictionary<string, string>>(
"EvaluateMeWithParamsAndAsyncReturn", // JavaScript method name
HybridSampleJSContext.Default.DictionaryStringString, // JSON serialization info for return type
["new_key", "new_value"], // Parameter values
Expand Down

0 comments on commit a3dd342

Please sign in to comment.