EventSource
Generated.swift:5442class EventSource
class EventSource
import DOM
class EventTarget
protocol ConstructibleFromJSValue
Types conforming to this protocol can be constructed from JSValue
.
protocol ConvertibleToJSValue
Objects that can be converted to a JavaScript value, preferably in a lossless manner.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol JSBridgedClass : JSBridgedType
Conform to this protocol when your Swift class wraps a JavaScript class.
protocol JSBridgedType : ConstructibleFromJSValue, ConvertibleToJSValue, CustomStringConvertible
Use this protocol when your type has no single JavaScript class. For example, a union type of multiple classes or primitive values.
required init(unsafelyWrapping jsObject: JSObject)
convenience init(url: String, eventSourceInitDict: EventSourceInit? = nil)
static let CLOSED: UInt16
static let CONNECTING: UInt16
static let OPEN: UInt16
override class var constructor: JSFunction? { get }
@ClosureAttribute1Optional var onerror: EventHandler { get set }
@ClosureAttribute1Optional var onmessage: EventHandler { get set }
@ClosureAttribute1Optional var onopen: EventHandler { get set }
@ReadonlyAttribute var readyState: UInt16 { get }
@ReadonlyAttribute var url: String { get }
@ReadonlyAttribute var withCredentials: Bool { get }
func close()