RunScriptRequest

@Serializable
data class RunScriptRequest(val scriptId: ScriptId, val executionContextId: ExecutionContextId? = null, val objectGroup: String? = null, val silent: Boolean? = null, val includeCommandLineAPI: Boolean? = null, val returnByValue: Boolean? = null, val generatePreview: Boolean? = null, val awaitPromise: Boolean? = null)

Request object containing input parameters for the RuntimeDomain.runScript command.

Constructors

Link copied to clipboard
constructor(scriptId: ScriptId, executionContextId: ExecutionContextId? = null, objectGroup: String? = null, silent: Boolean? = null, includeCommandLineAPI: Boolean? = null, returnByValue: Boolean? = null, generatePreview: Boolean? = null, awaitPromise: Boolean? = null)

Types

Link copied to clipboard
class Builder(val scriptId: ScriptId)

A builder for RunScriptRequest, which allows setting the optional parameters of the RuntimeDomain.runScript command via a lambda.

Properties

Link copied to clipboard
val awaitPromise: Boolean? = null

Whether execution should await for resulting value and return once awaited promise is resolved.

Link copied to clipboard

Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.

Link copied to clipboard

Whether preview should be generated for the result.

Link copied to clipboard

Determines whether Command Line API should be available during the evaluation.

Link copied to clipboard
val objectGroup: String? = null

Symbolic group name that can be used to release multiple objects.

Link copied to clipboard
val returnByValue: Boolean? = null

Whether the result is expected to be a JSON object which should be sent by value.

Link copied to clipboard

Id of the script to run.

Link copied to clipboard
val silent: Boolean? = null

In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.