Share via


JSInProcessObjectReference.InvokeNew(String, Object[]) Method

Definition

Invokes the specified JavaScript constructor function synchronously. The function is invoked with the new operator.

public Microsoft.JSInterop.IJSInProcessObjectReference InvokeNew(string identifier, object?[]? args);
abstract member InvokeNew : string * obj[] -> Microsoft.JSInterop.IJSInProcessObjectReference
override this.InvokeNew : string * obj[] -> Microsoft.JSInterop.IJSInProcessObjectReference
Public Function InvokeNew (identifier As String, args As Object()) As IJSInProcessObjectReference

Parameters

identifier
String

An identifier for the constructor function to invoke. For example, the value "someScope.SomeClass" will invoke the constructor window.someScope.SomeClass.

args
Object[]

JSON-serializable arguments.

Returns

An IJSInProcessObjectReference instance that represents the created JS object.

Implements

Applies to