data class ChromeDPTarget
Targets are the parts of the browser that the Chrome DevTools Protocol can interact with. This includes for instance pages, serviceworkers and extensions.
When a client wants to interact with a target using CDP, it has to first attach to the target using ChromeDPTarget.attach. This will establish a protocol session to the given target. The client can then interact with the target using the ChromeTargetSession.
<init> |
Targets are the parts of the browser that the Chrome DevTools Protocol can interact with. This includes for instance pages, serviceworkers and extensions. ChromeDPTarget(id: String, title: String, type: String, description: String, devtoolsFrontendUrl: String, webSocketDebuggerUrl: String) |
description |
val description: String |
devtoolsFrontendUrl |
val devtoolsFrontendUrl: String |
id |
val id: String |
title |
val title: String |
type |
val type: String |
webSocketDebuggerUrl |
val webSocketDebuggerUrl: String |
attach |
Attaches to this target via a new web socket connection to this target's debugger URL. This establishes a new protocol session to this target. suspend fun attach(webSocketClient: WebSocketClient = DEFAULT_WEBSOCKET_CLIENT): ChromeTargetSession |
use |
Attaches to this target via a new web socket connection, and performs the given operation before closing the connection. suspend fun <T> ChromeDPTarget.use(block: (ChromeTargetSession) -> T): T |