class TargetDomain
Supports additional targets discovery and allows to attach to them.
activateTarget |
Activates (focuses) the target. suspend fun activateTarget(input: ActivateTargetRequest): Unit |
attachedToTarget |
Issued when attached to target because of auto-attach or fun attachedToTarget(): Flow<AttachedToTargetEvent> |
attachToBrowserTarget |
Attaches to the browser target, only uses flat sessionId mode. suspend fun attachToBrowserTarget(): AttachToBrowserTargetResponse |
attachToTarget |
Attaches to the target with given id. suspend fun attachToTarget(input: AttachToTargetRequest): AttachToTargetResponse |
closeTarget |
Closes the target. If the target is a page that gets closed too. suspend fun closeTarget(input: CloseTargetRequest): CloseTargetResponse |
createBrowserContext |
Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. suspend fun createBrowserContext(input: CreateBrowserContextRequest): CreateBrowserContextResponse |
createTarget |
Creates a new page. suspend fun createTarget(input: CreateTargetRequest): CreateTargetResponse |
detachedFromTarget |
Issued when detached from target for any reason (including fun detachedFromTarget(): Flow<DetachedFromTargetEvent> |
detachFromTarget |
Detaches session with given id. suspend fun detachFromTarget(input: DetachFromTargetRequest): Unit |
disposeBrowserContext |
Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks. suspend fun disposeBrowserContext(input: DisposeBrowserContextRequest): Unit |
events |
Subscribes to all events related to this domain. fun events(): Flow<TargetEvent> |
exposeDevToolsProtocol |
Inject object to the target's main frame that provides a communication channel with browser target. suspend fun exposeDevToolsProtocol(input: ExposeDevToolsProtocolRequest): Unit |
getBrowserContexts |
Returns all browser contexts created with suspend fun getBrowserContexts(): GetBrowserContextsResponse |
getTargetInfo |
Returns information about a target. suspend fun getTargetInfo(input: GetTargetInfoRequest): GetTargetInfoResponse |
getTargets |
Retrieves a list of available targets. suspend fun getTargets(): GetTargetsResponse |
receivedMessageFromTarget |
Notifies about a new protocol message received from the session (as reported in
fun receivedMessageFromTarget(): Flow<ReceivedMessageFromTargetEvent> |
sendMessageToTarget |
Sends protocol message over session with given id. Consider using flat mode instead; see commands attachToTarget, setAutoAttach, and crbug.com/991325. suspend fun |
setAutoAttach |
Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. suspend fun setAutoAttach(input: SetAutoAttachRequest): Unit |
setDiscoverTargets |
Controls whether to discover available targets and notify via
suspend fun setDiscoverTargets(input: SetDiscoverTargetsRequest): Unit |
setRemoteLocations |
Enables target discovery for the specified locations, when suspend fun setRemoteLocations(input: SetRemoteLocationsRequest): Unit |
targetCrashed |
Issued when a target has crashed. fun targetCrashed(): Flow<TargetCrashedEvent> |
targetCreated |
Issued when a possible inspection target is created. fun targetCreated(): Flow<TargetCreatedEvent> |
targetDestroyed |
Issued when a target is destroyed. fun targetDestroyed(): Flow<TargetDestroyedEvent> |
targetInfoChanged |
Issued when some information about a target has changed. This only happens between
fun targetInfoChanged(): Flow<TargetInfoChangedEvent> |