Click or drag to resize

IJsObjectInvokeT Method (String, Object)

Executes the function with the given methodName and the args in the JavaScript object. This method blocks current thread execution until the function finishes its execution. If the function raises an exception, then a JsException with an error message that describes the reason of the exception will be thrown. Same error message will be printed in JavaScript Console.

Namespace:  DotNetBrowser.Js
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.13.0
Syntax
C#
T Invoke<T>(
	string methodName,
	params Object[] args
)

Parameters

methodName
Type: SystemString
The function name.
args
Type: SystemObject
the list of input arguments. The following types are supported: Boolean, Double, String, IJsObject, or Object.

Type Parameters

T
The expected type of the result of the JavaScript function execution

Return Value

Type: T
The result of the JavaScript function execution.
Exceptions
ExceptionCondition
JsExceptionThe JavaScript function raised an exception.
ObjectDisposedExceptionThe IJsObject has already been disposed.
ConnectionClosedExceptionThe connection to the Chromium engine is closed.
See Also