You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Takes param array so multiple arguments can be passed
A IJavascriptCallback is a proxy for a method in Javascript. You can call a bound method and pass in a reference to a function, then at some later point in your .Net code you can execute the IJavascriptCallback.ExecuteAsync method and the Javascript function will be called.
publicvoidTestCallback(IJavascriptCallbackjavascriptCallback){constinttaskDelay=1500;Task.Run(async()=>{awaitTask.Delay(taskDelay);using(javascriptCallback){awaitjavascriptCallback.ExecuteAsync("This callback from C# was delayed "+taskDelay+"ms");}});}
functionMyCallback(stringmsg){alert("My callback returned - "+msg):
}boundAsync.testCallback(MyCallback);