Click or drag to resize

RuntimeRunScriptAsync Method

Version 85.3.121
Runs script with given id in a given context.

Namespace:  CefSharp.DevTools.Runtime
Assembly:  CefSharp (in CefSharp.dll) Version: 85.3.121.0 (85.3.121.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
)

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: TaskRunScriptResponse
returns System.Threading.Tasks.Task<RunScriptResponse>
See Also