Share via


JSInProcessObjectReference.Invoke<TValue>(String, Object[]) Method

Definition

Invokes the specified JavaScript function synchronously.

public:
generic <typename TValue>
 virtual TValue Invoke(System::String ^ identifier, ... cli::array <System::Object ^> ^ args);
public TValue Invoke<TValue> (string identifier, params object?[]? args);
abstract member Invoke : string * obj[] -> 'Value
override this.Invoke : string * obj[] -> 'Value
Public Function Invoke(Of TValue) (identifier As String, ParamArray args As Object()) As TValue

Type Parameters

TValue

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 someScope.someFunction on the target instance.

args
Object[]

JSON-serializable arguments.

Returns

TValue

An instance of TValue obtained by JSON-deserializing the return value.

Implements

Applies to