This code will help you to understand what if ‘RegisteredFunction’ does not exist in the current context in Blazor.
Solution:
‘RegisteredFunction’ does not exist anymore from Blazor v0.5.0.
JavaScript code
function JSMethod() { document.getElementById('demop').innerText = "JavaScript Method invoked"; }
Blazor code
@page "/jsinterop" @inject IJSRuntime JsRuntime; @code { protected void CallJSMethod() { JSRuntime.InvokeAsync<bool>("JSMethod"); } }
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Solution:
‘RegisteredFunction’ does not exist anymore from Blazor v0.5.0.
JavaScript code
Blazor code
need an explanation for this answer? contact us directly to get an explanation for this answer