Not documented.

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

Constants

int CLOSED = 2
const
int CONNECTING = 0
const
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.
int OPEN = 1
const
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.

Properties

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.
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.
int readyState
read-only
String url
read-only
bool withCredentials
read-only

Constructors

EventSource(String url, {withCredentials: false})

Methods

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