chrome-devtools-kotlin / org.hildan.chrome.devtools.protocol / ChromeDPSession / events

events

fun <reified E> events(eventName: String): Flow<E>

Subscribes to events of the given eventName, converting their payload to instances of E.

fun <E> events(eventName: String, deserializer: DeserializationStrategy<E>): Flow<E>

Subscribes to events of the given eventName, converting their payload to instances of E using deserializer.

fun <E> events(deserializers: Map<String, DeserializationStrategy<out E>>): Flow<E>

Subscribes to events whose names are in the provided deserializers map, converting their payload to subclasses of E using the corresponding deserializer in the map.