AddScriptToEvaluateOnNewDocumentRequest

@Serializable
data class AddScriptToEvaluateOnNewDocumentRequest(val source: String, val worldName: String? = null, val includeCommandLineAPI: Boolean? = null, val runImmediately: Boolean? = null)

Request object containing input parameters for the PageDomain.addScriptToEvaluateOnNewDocument command.

Constructors

Link copied to clipboard
constructor(source: String, worldName: String? = null, includeCommandLineAPI: Boolean? = null, runImmediately: Boolean? = null)

Types

Link copied to clipboard
class Builder(val source: String)

A builder for AddScriptToEvaluateOnNewDocumentRequest, which allows setting the optional parameters of the PageDomain.addScriptToEvaluateOnNewDocument command via a lambda.

Properties

Link copied to clipboard

Specifies whether command line API should be available to the script, defaults to false.

Link copied to clipboard

If true, runs the script immediately on existing execution contexts or worlds. Default: false.

Link copied to clipboard

(undocumented in the protocol definition)

Link copied to clipboard

If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.