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
An instance of TResult
obtained by JSON-deserializing the return value.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for