Click or drag to resize

RuntimeClientRunScriptAsync Method

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

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

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