Message

@Serializable(with = MessageSerializer::class)
sealed class Message

Base type for any message exchanged with the Chrome DevTools Protocol (CDP).

A Message can be either:

  • a Response: the result of a previously sent command,

  • an Event: a notification emitted asynchronously by the browser.

See: https://chromedevtools.github.io/devtools-protocol/

Inheritors

Types

Link copied to clipboard
@Serializable
class Event(val method: String, val params: JsonElement? = null) : Message

Represents an event emitted asynchronously by the browser.

Link copied to clipboard
@Serializable
class Response(val id: Long, val result: JsonElement? = null, val error: Message.Response.ResponseError? = null) : Message

Represents the response of a CDP command.