InvokeJSFunctionAsync Method
Invoke JavaScript function from JSFunction object.
In some cases, from the browser JavaScript side, try using the C# JavaScript function with function type argument, such as:
RegisterJSFunction("csharpExecCallback", callback => InvokeJSFunctionAsync(callback, "TestResult"));
Thus, the browser javascript side can call:
window.csharpExecCallback(function(result) { console.log(result); });
Syntax
Parameters
- jsFunctionInstance
- JSFunction object instance.
- arguments
- Execution arguments.
Return Value
Execution result.
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also