Click or drag to resize

RuntimeClientCallFunctionOnAsync Method

Version 113.3.50
Calls function with given declaration on the given object. Object group of the result is inherited from the target object.

Namespace:  CefSharp.DevTools.Runtime
Assembly:  CefSharp.Core (in CefSharp.Core.dll) Version: 113.3.50.0
Syntax
public Task<CallFunctionOnResponse> CallFunctionOnAsync(
	string functionDeclaration,
	string objectId = null,
	IList<CallArgument> arguments = null,
	bool? silent = null,
	bool? returnByValue = null,
	bool? generatePreview = null,
	bool? userGesture = null,
	bool? awaitPromise = null,
	int? executionContextId = null,
	string objectGroup = null,
	bool? throwOnSideEffect = null,
	string uniqueContextId = null,
	bool? generateWebDriverValue = null
)

Parameters

functionDeclaration
Type: SystemString
Declaration of the function to call.
objectId (Optional)
Type: SystemString
Identifier of the object to call function on. Either objectId or executionContextId shouldbe specified.
arguments (Optional)
Type: System.Collections.GenericIListCallArgument
Call arguments. All call arguments must belong to the same JavaScript world as the targetobject.
silent (Optional)
Type: SystemNullableBoolean
In silent mode exceptions thrown during evaluation are not reported and do not pauseexecution. Overrides `setPauseOnException` state.
returnByValue (Optional)
Type: SystemNullableBoolean
Whether the result is expected to be a JSON object which should be sent by value.
generatePreview (Optional)
Type: SystemNullableBoolean
Whether preview should be generated for the result.
userGesture (Optional)
Type: SystemNullableBoolean
Whether execution should be treated as initiated by user in the UI.
awaitPromise (Optional)
Type: SystemNullableBoolean
Whether execution should `await` for resulting value and return once awaited promise isresolved.
executionContextId (Optional)
Type: SystemNullableInt32
Specifies execution context which global object will be used to call function on. EitherexecutionContextId or objectId should be specified.
objectGroup (Optional)
Type: SystemString
Symbolic group name that can be used to release multiple objects. If objectGroup is notspecified and objectId is, objectGroup will be inherited from object.
throwOnSideEffect (Optional)
Type: SystemNullableBoolean
Whether to throw an exception if side effect cannot be ruled out during evaluation.
uniqueContextId (Optional)
Type: SystemString
An alternative way to specify the execution context to call function on.Compared to contextId that may be reused across processes, this is guaranteed to besystem-unique, so it can be used to prevent accidental function callin context different than intended (e.g. as a result of navigation across processboundaries).This is mutually exclusive with `executionContextId`.
generateWebDriverValue (Optional)
Type: SystemNullableBoolean
Whether the result should contain `webDriverValue`, serialized according tohttps://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, butresulting `objectId` is still provided.

Return Value

Type: TaskCallFunctionOnResponse
returns System.Threading.Tasks.Task<CallFunctionOnResponse>
See Also