Skip to content

Instantly share code, notes, and snippets.

@EdCharbeneau
Last active August 29, 2018 17:44
Show Gist options
  • Save EdCharbeneau/e8d156257b2f84ee91ac3c6a8785b51a to your computer and use it in GitHub Desktop.
Save EdCharbeneau/e8d156257b2f84ee91ac3c6a8785b51a to your computer and use it in GitHub Desktop.
Working with the Blazor JavaScript Interop
using Microsoft.JSInterop;
public class ExampleJsInterop
{
public static Task<T> MethodName(TArgs args)
{
// Implemented in exampleJsInterop.js
return JSRuntime.Current.InvokeAsync<T>("scope.jsMethod", args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment