RuntimeClientRunScriptAsync Method |
Version 98.1.210
Runs script with given id in a given context.
Namespace:
CefSharp.DevTools.Runtime
Assembly:
CefSharp (in CefSharp.dll) Version: 98.1.210.0 (98.1.210.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
- 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