EventSource

open class EventSource(url: String, eventSourceInitDict: EventSourceInit) : EventTarget, JsAny

Exposes the JavaScript EventSource to Kotlin

Constructors

Link copied to clipboard
constructor(url: String, eventSourceInitDict: EventSourceInit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var onerror: (Event) -> Unit?
Link copied to clipboard
Link copied to clipboard
var onopen: (Event) -> Unit?
Link copied to clipboard
open val readyState: Short
Link copied to clipboard
open val url: String
Link copied to clipboard

Functions

Link copied to clipboard
fun addEventListener(type: String, callback: (Event) -> Unit?)
fun addEventListener(type: String, callback: EventListener?)
fun addEventListener(type: String, callback: (Event) -> Unit?, options: Boolean)
fun addEventListener(type: String, callback: (Event) -> Unit?, options: AddEventListenerOptions)
fun addEventListener(type: String, callback: EventListener?, options: Boolean)
Link copied to clipboard
fun close()
Link copied to clipboard
Link copied to clipboard
fun removeEventListener(type: String, callback: (Event) -> Unit?)
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: Boolean)
fun removeEventListener(type: String, callback: (Event) -> Unit?, options: EventListenerOptions)
fun removeEventListener(type: String, callback: EventListener?, options: Boolean)