class
EventSource

(Not documented.)

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

Constants

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

Properties

int readyState
read-only
String url
read-only
bool withCredentials
read-only
Stream<Event> onError
read-only
Stream of error events handled by this [EventSource].
Stream<MessageEvent> onMessage
read-only
Stream of message events handled by this [EventSource].
Stream<Event> onOpen
read-only
Stream of open events handled by this [EventSource].
Events on
read-only , inherited
This is an ease-of-use accessor for event streams which should only be used when an explicit accessor is not available.

Constructors

EventSource(String url, {withCredentials: false})

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