RuntimeClientCallFunctionOnAsync Method |
Version 99.2.120
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 (in CefSharp.dll) Version: 99.2.120.0 (99.2.120.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
)
public:
Task<CallFunctionOnResponse^>^ CallFunctionOnAsync(
String^ functionDeclaration,
String^ objectId = nullptr,
IList<CallArgument^>^ arguments = nullptr,
Nullable<bool> silent = nullptr,
Nullable<bool> returnByValue = nullptr,
Nullable<bool> generatePreview = nullptr,
Nullable<bool> userGesture = nullptr,
Nullable<bool> awaitPromise = nullptr,
Nullable<int> executionContextId = nullptr,
String^ objectGroup = nullptr,
Nullable<bool> throwOnSideEffect = nullptr
)
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.
Return Value
Type:
TaskCallFunctionOnResponsereturns System.Threading.Tasks.Task<CallFunctionOnResponse>
See Also