RuntimeClientRunScriptAsync Method |
Version 88.2.90
Runs script with given id in a given context.
Namespace:
CefSharp.DevTools.Runtime
Assembly:
CefSharp (in CefSharp.dll) Version: 88.2.90.0 (88.2.90.0)
Syntax public Task<RunScriptResponse> RunScriptAsync(
string scriptId,
Nullable<int> executionContextId = null,
string objectGroup = null,
Nullable<bool> silent = null,
Nullable<bool> includeCommandLineAPI = null,
Nullable<bool> returnByValue = null,
Nullable<bool> generatePreview = null,
Nullable<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
- Type: SystemString
Id of the script to run. - executionContextId (Optional)
- Type: SystemNullableInt32
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 (Optional)
- Type: SystemString
Symbolic group name that can be used to release multiple objects. - silent (Optional)
- Type: SystemNullableBoolean
In silent mode exceptions thrown during evaluation are not reported and do not pauseexecution. Overrides `setPauseOnException` state. - includeCommandLineAPI (Optional)
- Type: SystemNullableBoolean
Determines whether Command Line API should be available during the evaluation. - 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. - awaitPromise (Optional)
- Type: SystemNullableBoolean
Whether execution should `await` for resulting value and return once awaited promise isresolved.
Return Value
Type:
TaskRunScriptResponsereturns System.Threading.Tasks.Task<RunScriptResponse>
See Also