InvokeAsync

Learn how to use asynchronous methods with return values to call JavaScript in Blazor WebAssembly.

We'll cover the following

The InvokeAsync method is used when we want to call a JavaScript function that returns a value. It invokes the specified JavaScript function asynchronously.

This is the InvokeAsync method of IJSRuntime:

Get hands-on with 1400+ tech skills courses.