Created
August 29, 2018 17:41
-
-
Save EdCharbeneau/0dec7e99d526c14ef1872975a11b6f3a to your computer and use it in GitHub Desktop.
Working with the Blazor JavaScript Interop 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.JSInterop; | |
public class PromptInterop | |
{ | |
/// <summary> | |
/// Invokes a browser prompt and returns the user's input. | |
/// </summary> | |
public static Task<string> PromptAsync(string message) { | |
return JSRuntime.Current.InvokeAsync<string>("myNamespace.showPrompt",message); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment