Package-level declarations

Types

Link copied to clipboard
@Serializable
data class AddBindingRequest(val name: String, val executionContextId: ExecutionContextId? = null, val executionContextName: String? = null)

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

Link copied to clipboard
@Serializable
object AddBindingResponse

A dummy response object for the RuntimeDomain.addBinding command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class AwaitPromiseRequest(val promiseObjectId: RemoteObjectId, val returnByValue: Boolean? = null, val generatePreview: Boolean? = null)

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

Link copied to clipboard
@Serializable
data class AwaitPromiseResponse(val result: RemoteObject, val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.awaitPromise command.

Link copied to clipboard
@Serializable
data class CallArgument(val value: JsonElement? = null, val unserializableValue: UnserializableValue? = null, val objectId: RemoteObjectId? = null)

Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.

Link copied to clipboard
@Serializable
data class CallFrame(val functionName: String, val scriptId: ScriptId, val url: String, val lineNumber: Int, val columnNumber: Int)

Stack entry for runtime errors and assertions.

Link copied to clipboard
@Serializable
data class CallFunctionOnRequest(val functionDeclaration: String, val objectId: RemoteObjectId? = null, val arguments: List<CallArgument>? = null, val silent: Boolean? = null, val returnByValue: Boolean? = null, val generatePreview: Boolean? = null, val userGesture: Boolean? = null, val awaitPromise: Boolean? = null, val executionContextId: ExecutionContextId? = null, val objectGroup: String? = null, val throwOnSideEffect: Boolean? = null, val uniqueContextId: String? = null, val serializationOptions: SerializationOptions? = null)

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

Link copied to clipboard
@Serializable
data class CallFunctionOnResponse(val result: RemoteObject, val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.callFunctionOn command.

Link copied to clipboard
@Serializable
data class CompileScriptRequest(val expression: String, val sourceURL: String, val persistScript: Boolean, val executionContextId: ExecutionContextId? = null)

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

Link copied to clipboard
@Serializable
data class CompileScriptResponse(val scriptId: ScriptId? = null, val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.compileScript command.

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
data class CustomPreview(val header: String, val bodyGetterId: RemoteObjectId? = null)

(undocumented in the protocol definition)

Link copied to clipboard
@Serializable
data class DeepSerializedValue(val type: DeepSerializedValueType, val value: JsonElement? = null, val objectId: String? = null, val weakLocalObjectReference: Int? = null)

Represents deep serialized value.

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
object DisableResponse

A dummy response object for the RuntimeDomain.disable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
object DiscardConsoleEntriesResponse

A dummy response object for the RuntimeDomain.discardConsoleEntries command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
object EnableResponse

A dummy response object for the RuntimeDomain.enable command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class EntryPreview(val key: ObjectPreview? = null, val value: ObjectPreview)

(undocumented in the protocol definition)

Link copied to clipboard
@Serializable
data class EvaluateRequest(val expression: String, val objectGroup: String? = null, val includeCommandLineAPI: Boolean? = null, val silent: Boolean? = null, val contextId: ExecutionContextId? = null, val returnByValue: Boolean? = null, val generatePreview: Boolean? = null, val userGesture: Boolean? = null, val awaitPromise: Boolean? = null, val throwOnSideEffect: Boolean? = null, val timeout: TimeDelta? = null, val disableBreaks: Boolean? = null, val replMode: Boolean? = null, val allowUnsafeEvalBlockedByCSP: Boolean? = null, val uniqueContextId: String? = null, val serializationOptions: SerializationOptions? = null)

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

Link copied to clipboard
@Serializable
data class EvaluateResponse(val result: RemoteObject, val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.evaluate command.

Link copied to clipboard
@Serializable
data class ExceptionDetails(val exceptionId: Int, val text: String, val lineNumber: Int, val columnNumber: Int, val scriptId: ScriptId? = null, val url: String? = null, val stackTrace: StackTrace? = null, val exception: RemoteObject? = null, val executionContextId: ExecutionContextId? = null, val exceptionMetaData: JsonObject? = null)

Detailed information about exception (or error) that was thrown during script compilation or execution.

Link copied to clipboard
@Serializable
data class ExecutionContextDescription(val id: ExecutionContextId, val origin: String, val name: String, val uniqueId: String? = null, val auxData: JsonObject? = null)

Description of an isolated world.

Link copied to clipboard

Id of an execution context.

Link copied to clipboard
@Serializable
data class GetExceptionDetailsRequest(val errorObjectId: RemoteObjectId)

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

Link copied to clipboard
@Serializable
data class GetExceptionDetailsResponse(val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.getExceptionDetails command.

Link copied to clipboard
@Serializable
data class GetHeapUsageResponse(val usedSize: Double, val totalSize: Double)

Response type for the RuntimeDomain.getHeapUsage command.

Link copied to clipboard
@Serializable
data class GetIsolateIdResponse(val id: String)

Response type for the RuntimeDomain.getIsolateId command.

Link copied to clipboard
@Serializable
data class GetPropertiesRequest(val objectId: RemoteObjectId, val ownProperties: Boolean? = null, val accessorPropertiesOnly: Boolean? = null, val generatePreview: Boolean? = null, val nonIndexedPropertiesOnly: Boolean? = null)

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

Link copied to clipboard
@Serializable
data class GetPropertiesResponse(val result: List<PropertyDescriptor>, val internalProperties: List<InternalPropertyDescriptor>? = null, val privateProperties: List<PrivatePropertyDescriptor>? = null, val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.getProperties command.

Link copied to clipboard
@Serializable
data class GlobalLexicalScopeNamesRequest(val executionContextId: ExecutionContextId? = null)

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

Link copied to clipboard
@Serializable
data class GlobalLexicalScopeNamesResponse(val names: List<String>)

Response type for the RuntimeDomain.globalLexicalScopeNames command.

Link copied to clipboard
@Serializable
data class InternalPropertyDescriptor(val name: String, val value: RemoteObject? = null)

Object internal property descriptor. This property isn't normally visible in JavaScript code.

Link copied to clipboard
@Serializable
data class ObjectPreview(val type: ObjectPreviewType, val subtype: ObjectPreviewSubtype? = null, val description: String? = null, val overflow: Boolean, val properties: List<PropertyPreview>, val entries: List<EntryPreview>? = null)

Object containing abbreviated remote object value.

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
data class PrivatePropertyDescriptor(val name: String, val value: RemoteObject? = null, val get: RemoteObject? = null, val set: RemoteObject? = null)

Object private field descriptor.

Link copied to clipboard
@Serializable
data class PropertyDescriptor(val name: String, val value: RemoteObject? = null, val writable: Boolean? = null, val get: RemoteObject? = null, val set: RemoteObject? = null, val configurable: Boolean, val enumerable: Boolean, val wasThrown: Boolean? = null, val isOwn: Boolean? = null, val symbol: RemoteObject? = null)

Object property descriptor.

Link copied to clipboard
@Serializable
data class PropertyPreview(val name: String, val type: PropertyPreviewType, val value: String? = null, val valuePreview: ObjectPreview? = null, val subtype: PropertyPreviewSubtype? = null)

(undocumented in the protocol definition)

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
data class QueryObjectsRequest(val prototypeObjectId: RemoteObjectId, val objectGroup: String? = null)

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

Link copied to clipboard
@Serializable
data class QueryObjectsResponse(val objects: RemoteObject)

Response type for the RuntimeDomain.queryObjects command.

Link copied to clipboard
@Serializable
data class ReleaseObjectGroupRequest(val objectGroup: String)

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

Link copied to clipboard
@Serializable
object ReleaseObjectGroupResponse

A dummy response object for the RuntimeDomain.releaseObjectGroup command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class ReleaseObjectRequest(val objectId: RemoteObjectId)

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

Link copied to clipboard
@Serializable
object ReleaseObjectResponse

A dummy response object for the RuntimeDomain.releaseObject command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class RemoteObject(val type: RemoteObjectType, val subtype: RemoteObjectSubtype? = null, val className: String? = null, val value: JsonElement? = null, val unserializableValue: UnserializableValue? = null, val description: String? = null, val deepSerializedValue: DeepSerializedValue? = null, val objectId: RemoteObjectId? = null, val preview: ObjectPreview? = null, val customPreview: CustomPreview? = null)

Mirror object referencing original JavaScript object.

Link copied to clipboard

Unique object identifier.

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
enum RemoteObjectType : Enum<RemoteObjectType>

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
data class RemoveBindingRequest(val name: String)

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

Link copied to clipboard
@Serializable
object RemoveBindingResponse

A dummy response object for the RuntimeDomain.removeBinding command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard

A dummy response object for the RuntimeDomain.runIfWaitingForDebugger command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@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.

Link copied to clipboard
@Serializable
data class RunScriptResponse(val result: RemoteObject, val exceptionDetails: ExceptionDetails? = null)

Response type for the RuntimeDomain.runScript command.

Link copied to clipboard

Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.

Link copied to clipboard
class RuntimeJSEvaluationException(val jsExpression: String, val details: ExceptionDetails) : Exception

Thrown when the evaluation of some JS expression went wrong.

Link copied to clipboard
typealias ScriptId = String

Unique script identifier.

Link copied to clipboard
@Serializable
data class SerializationOptions(val serialization: SerializationOptionsSerialization, val maxDepth: Int? = null, val additionalParameters: JsonObject? = null)

Represents options for serialization. Overrides generatePreview and returnByValue.

Link copied to clipboard

This enum doesn't have a proper description because it was generated from an inline declaration. Its name was inferred based on the place where it is used:

Link copied to clipboard
@Serializable
data class SetAsyncCallStackDepthRequest(val maxDepth: Int)

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

Link copied to clipboard
@Serializable
object SetAsyncCallStackDepthResponse

A dummy response object for the RuntimeDomain.setAsyncCallStackDepth command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class SetCustomObjectFormatterEnabledRequest(val enabled: Boolean)

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

Link copied to clipboard

A dummy response object for the RuntimeDomain.setCustomObjectFormatterEnabled command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class SetMaxCallStackSizeToCaptureRequest(val size: Int)

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

Link copied to clipboard

A dummy response object for the RuntimeDomain.setMaxCallStackSizeToCapture command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
@Serializable
data class StackTrace(val description: String? = null, val callFrames: List<CallFrame>, val parent: StackTrace? = null, val parentId: StackTraceId? = null)

Call frames for assertions or error messages.

Link copied to clipboard
@Serializable
data class StackTraceId(val id: String, val debuggerId: UniqueDebuggerId? = null)

If debuggerId is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See Runtime.StackTrace and Debugger.paused for usages.

Link copied to clipboard
@Serializable
object TerminateExecutionResponse

A dummy response object for the RuntimeDomain.terminateExecution command. This command doesn't return any result at the moment, but this could happen in the future, or could have happened in the past. For forwards and backwards compatibility of the command method, we still declare this class even without properties.

Link copied to clipboard
typealias TimeDelta = Double

Number of milliseconds.

Link copied to clipboard
typealias Timestamp = Double

Number of milliseconds since epoch.

Link copied to clipboard

Unique identifier of current debugger.

Link copied to clipboard

Primitive value which cannot be JSON-stringified. Includes values -0, NaN, Infinity, -Infinity, and bigint literals.

Functions

Link copied to clipboard
inline suspend fun <T> RuntimeDomain.evaluateJs(js: String): T?

Evaluates the given js expression, and returns the result as a value of type T.

suspend fun <T> RuntimeDomain.evaluateJs(js: String, deserializer: DeserializationStrategy<T>): T?

Evaluates the given js expression, and returns the result as a value of type T using the provided deserializer.