Not documented.
- Annotations
- DomName('EventSource')
- Experimental()
- Extends
- Object
- EventTarget
- EventSource
Constants
- int CLOSED = 2
-
const
- int CONNECTING = 0
-
const
-
EventStreamProvider<Event>
errorEvent
=
const EventStreamProvider<Event>
('error') -
constStatic factory designed to expose
error
events to event handlers that are not necessarily instances of EventSource. -
EventStreamProvider<MessageEvent>
messageEvent
=
const EventStreamProvider<MessageEvent>
('message') -
constStatic 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') -
constStatic factory designed to expose
open
events to event handlers that are not necessarily instances of EventSource.
Properties
- Events on
-
read-only, inheritedThis 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-onlyStream of
error
events handled by thisEventSource
. - Stream<MessageEvent> onMessage
-
read-onlyStream of
message
events handled by thisEventSource
. - Stream<Event> onOpen
-
read-onlyStream of
open
events handled by thisEventSource
. - int readyState
-
read-only
- String url
-
read-only
- bool withCredentials
-
read-only
Constructors
- EventSource(String url, {withCredentials: false})