Click or drag to resize

IJsFunctionInvoke Method (IJsObject, Object)

Executes the function on the given jsObject with the args. This method blocks current thread execution until the function finishes its execution. If the function raises an exception, then 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.23.2
Syntax
C#
Object Invoke(
	IJsObject jsObject,
	params Object[] args
)

Parameters

jsObject
Type: DotNetBrowser.JsIJsObject
The JavaScript object to invoke this function on. Pass null to invoke the function as a global function.
args
Type: SystemObject
The list of input arguments. The following types are supported: Boolean, Double, String, IJsObject, or Object.

Return Value

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