RuntimeClientCallFunctionOnAsync Method |
Version 130.1.90
Calls function with given declaration on the given object. Object group of the result is
inherited from the target object.
Namespace: CefSharp.DevTools.RuntimeAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.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,
SerializationOptions serializationOptions = 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,
String^ uniqueContextId = nullptr,
SerializationOptions^ serializationOptions = nullptr
)
Parameters
- functionDeclaration String
- Declaration of the function to call.
- objectId String (Optional)
- Identifier of the object to call function on. Either objectId or executionContextId shouldbe specified.
- arguments IListCallArgument (Optional)
- Call arguments. All call arguments must belong to the same JavaScript world as the targetobject.
- silent NullableBoolean (Optional)
- In silent mode exceptions thrown during evaluation are not reported and do not pauseexecution. Overrides `setPauseOnException` state.
- returnByValue NullableBoolean (Optional)
- Whether the result is expected to be a JSON object which should be sent by value.Can be overriden by `serializationOptions`.
- generatePreview NullableBoolean (Optional)
- Whether preview should be generated for the result.
- userGesture NullableBoolean (Optional)
- Whether execution should be treated as initiated by user in the UI.
- awaitPromise NullableBoolean (Optional)
- Whether execution should `await` for resulting value and return once awaited promise isresolved.
- executionContextId NullableInt32 (Optional)
- Specifies execution context which global object will be used to call function on. EitherexecutionContextId or objectId should be specified.
- objectGroup String (Optional)
- 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 NullableBoolean (Optional)
- Whether to throw an exception if side effect cannot be ruled out during evaluation.
- uniqueContextId String (Optional)
- 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`.
- serializationOptions SerializationOptions (Optional)
- Specifies the result serialization. If provided, overrides`generatePreview` and `returnByValue`.
Return Value
TaskCallFunctionOnResponsereturns System.Threading.Tasks.Task<CallFunctionOnResponse>
See Also