EventSource class

Annotations
  • DomName('EventSource')
  • Experimental()
Extends

Constructors

EventSource(String url, {withCredentials: false})

Constants

errorEvent = const EventStreamProvider<Event>('error')
Static factory designed to expose error events to event handlers that are not necessarily instances of EventSource.
messageEvent = const EventStreamProvider<MessageEvent>('message')
Static factory designed to expose message events to event handlers that are not necessarily instances of EventSource.
openEvent = const EventStreamProvider<Event>('open')
Static factory designed to expose open events to event handlers that are not necessarily instances of EventSource.
CLOSED = 2
CONNECTING = 0
OPEN = 1

Instance Properties

readyState int
read-only
url String
read-only
withCredentials bool
read-only
onError Stream<Event>
read-only
onMessage Stream<MessageEvent>
read-only
onOpen Stream<Event>
read-only
on Events Inherited
read-only

Instance Methods

close() → void
addEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void Inherited
removeEventListener(String type, dynamic listener(Event event), [bool useCapture]) → void Inherited
dispatchEvent(Event event) → bool Inherited