using Microsoft.JSInterop; using System.Threading.Tasks; namespace TestContentPackage { public static class MyPrompt { public static Task Show(string message) { return JSRuntime.Current.InvokeAsync( "TestContentPackage.showPrompt", // Keep in sync with identifiers in the.js file message); } } }