RuntimeClientRunScriptAsync Method |
Version 130.1.90
Runs script with given id in a given context.
Namespace: CefSharp.DevTools.RuntimeAssembly: CefSharp.Core (in CefSharp.Core.dll) Version: 129.0.110.0
Syntax public Task<RunScriptResponse> RunScriptAsync(
string scriptId,
int? executionContextId = null,
string objectGroup = null,
bool? silent = null,
bool? includeCommandLineAPI = null,
bool? returnByValue = null,
bool? generatePreview = null,
bool? awaitPromise = null
)
public:
Task<RunScriptResponse^>^ RunScriptAsync(
String^ scriptId,
Nullable<int> executionContextId = nullptr,
String^ objectGroup = nullptr,
Nullable<bool> silent = nullptr,
Nullable<bool> includeCommandLineAPI = nullptr,
Nullable<bool> returnByValue = nullptr,
Nullable<bool> generatePreview = nullptr,
Nullable<bool> awaitPromise = nullptr
)
Parameters
- scriptId String
- Id of the script to run.
- executionContextId NullableInt32 (Optional)
- Specifies in which execution context to perform script run. If the parameter is omitted theevaluation will be performed in the context of the inspected page.
- objectGroup String (Optional)
- Symbolic group name that can be used to release multiple objects.
- silent NullableBoolean (Optional)
- In silent mode exceptions thrown during evaluation are not reported and do not pauseexecution. Overrides `setPauseOnException` state.
- includeCommandLineAPI NullableBoolean (Optional)
- Determines whether Command Line API should be available during the evaluation.
- returnByValue NullableBoolean (Optional)
- Whether the result is expected to be a JSON object which should be sent by value.
- generatePreview NullableBoolean (Optional)
- Whether preview should be generated for the result.
- awaitPromise NullableBoolean (Optional)
- Whether execution should `await` for resulting value and return once awaited promise isresolved.
Return Value
TaskRunScriptResponsereturns System.Threading.Tasks.Task<RunScriptResponse>
See Also