chrome-devtools-kotlin / org.hildan.chrome.devtools.domains.runtime / EvaluateRequest

EvaluateRequest

data class EvaluateRequest

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

Constructors

<init>

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

EvaluateRequest(expression: String, objectGroup: String? = null, includeCommandLineAPI: Boolean? = null, silent: Boolean? = null, contextId: ExecutionContextId? = null, returnByValue: Boolean? = null, generatePreview: Boolean? = null, userGesture: Boolean? = null, awaitPromise: Boolean? = null, throwOnSideEffect: Boolean? = null, timeout: TimeDelta? = null, disableBreaks: Boolean? = null, replMode: Boolean? = null, allowUnsafeEvalBlockedByCSP: Boolean? = null)

Properties

allowUnsafeEvalBlockedByCSP

The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.

val allowUnsafeEvalBlockedByCSP: Boolean?

awaitPromise

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

val awaitPromise: Boolean?

contextId

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

val contextId: ExecutionContextId?

disableBreaks

Disable breakpoints during execution.

val disableBreaks: Boolean?

expression

Expression to evaluate.

val expression: String

generatePreview

Whether preview should be generated for the result.

val generatePreview: Boolean?

includeCommandLineAPI

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

val includeCommandLineAPI: Boolean?

objectGroup

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

val objectGroup: String?

replMode

Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.

val replMode: Boolean?

returnByValue

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

val returnByValue: Boolean?

silent

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

val silent: Boolean?

throwOnSideEffect

Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.

val throwOnSideEffect: Boolean?

timeout

Terminate execution after timing out (number of milliseconds).

val timeout: TimeDelta?

userGesture

Whether execution should be treated as initiated by user in the UI.

val userGesture: Boolean?