Click or drag to resize

IFrame.ExecuteJavaScript<T> Method (String, Boolean)

Asynchronously executes JavaScript code using the current context and converts the execution result to the specified .NET type.

Namespace:  DotNetBrowser.Frames
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.27.5
Syntax
C#
Task<T> ExecuteJavaScript<T>(
	string javaScript,
	bool userGesture = false
)

Parameters

javaScript
Type: System.String
The JavaScript code.
userGesture (Optional)
Type: System.Boolean
Indicates whether JavaScript is initiated by a user gesture.

Type Parameters

T
.NET type of the result

Return Value

Type: Task<T>
The task that can be used to wait for completion and obtain the result of the JavaScript execution.
Exceptions
ExceptionCondition
ObjectDisposedExceptionThe IFrame object has already been disposed.
ArgumentException The javaScript is null, empty, or contains only blank characters.
See Also