EventSource

open external class EventSource(url: String, eventSourceInitDict: EventSourceInit = definedExternally) : EventTarget

Exposes the JavaScript EventSource to Kotlin

Constructors

Link copied to clipboard
fun EventSource(url: String, eventSourceInitDict: EventSourceInit = definedExternally)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun addEventListener(    type: String,     callback: (Event) -> Unit?,     options: dynamic = definedExternally)
fun addEventListener(    type: String,     callback: EventListener?,     options: dynamic = definedExternally)
Link copied to clipboard
fun close()
Link copied to clipboard
fun dispatchEvent(event: Event): Boolean
Link copied to clipboard
fun removeEventListener(    type: String,     callback: (Event) -> Unit?,     options: dynamic = definedExternally)
fun removeEventListener(    type: String,     callback: EventListener?,     options: dynamic = definedExternally)

Properties

Link copied to clipboard
var onerror: (Event) -> dynamic?
Link copied to clipboard
var onmessage: (MessageEvent) -> dynamic?
Link copied to clipboard
var onopen: (Event) -> dynamic?
Link copied to clipboard
open val readyState: Short
Link copied to clipboard
open val url: String
Link copied to clipboard
open val withCredentials: Boolean