public static async Task <T> InvokeAsyncWithPromise <T>(this IJSRuntime jSRuntime, string jsFunctionName, params object[] args) { var promiseHandler = new JsPromiseHandler <T>(jSRuntime); var result = await promiseHandler.CallAndWaitForResult(jsFunctionName, args); return(result); }
public static async Task InvokeVoidAsyncWithPromise(this IJSRuntime jSRuntime, string jsFunctionName, params object[] args) { var promiseHandler = new JsPromiseHandler(jSRuntime); await promiseHandler.CallAndWaitForResult(jsFunctionName, args); }