Event Bridge
constructor(webView: WebView, eventBus: EventBus = EventBus.getDefault(), json: Json = Json {
encodeDefaults = true
ignoreUnknownKeys = true
serializersModule = SerializersModule {
contextual(FileSerializer)
contextual(IntentSerializer)
contextual(ThrowableSerializer)
contextual(UriSerializer)
contextual(AnySerializer())
}
}, connectionKey: String = "racehorseConnection")
Parameters
web View
The WebView to which the event bridge will add the connection Javascript interface.
event Bus
The event bus to which events are posted.
json
The serializer instance.
connection Key
The key of the window
that exposes the connection Javascript interface.