DefaultConnection
open class DefaultConnection(websocketUrl: String, messageListeningScope: CoroutineScope, eventsBufferSize: Int, var targetInfo: Target.TargetInfo? = null, var owner: Browser? = null) : Connection
Default implementation of the Connection interface.
Inheritors
Constructors
Link copied to clipboard
constructor(websocketUrl: String, messageListeningScope: CoroutineScope, eventsBufferSize: Int, targetInfo: Target.TargetInfo? = null, owner: Browser? = null)
Properties
Functions
Link copied to clipboard
inline fun <T> Connection.addHandler(coroutineScope: CoroutineScope, crossinline event: CDP.() -> Flow<T>, crossinline handler: suspend (T) -> Unit): Job
Adds a handler for a specific CDP event.
Link copied to clipboard
open suspend override fun callCommand(method: String, parameter: JsonElement?, mode: CommandMode): JsonElement?
Internal method to call a CDP command.
Link copied to clipboard
Updates the target information by fetching it from the CDP.