IJSInProcessRuntime.Invoke<TResult>(String, Object[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes the specified JavaScript function synchronously.
public T Invoke<T> (string identifier, params object[] args);
public TResult Invoke<TResult> (string identifier, params object?[]? args);
abstract member Invoke : string * obj[] -> 'T
abstract member Invoke : string * obj[] -> 'Result
Public Function Invoke(Of T) (identifier As String, ParamArray args As Object()) As T
Public Function Invoke(Of TResult) (identifier As String, ParamArray args As Object()) As TResult
Type Parameters
- T TResult
The JSON-serializable return type.
Parameters
- identifier
- String
An identifier for the function to invoke. For example, the value "someScope.someFunction"
will invoke the function window.someScope.someFunction
.
- args
- Object[]
JSON-serializable arguments.
Returns
T
TResult
An instance of TResult
obtained by JSON-deserializing the return value.