EventSource class
- Inheritance
- Object
- EventTarget
- EventSource
- Annotations
- @Native.new("EventSource")
Constructors
- EventSource(Stringurl, {dynamicwithCredentials =false})
- factory
Properties
- hashCode→int
- The hash code for this object.no setterinherited
- on→Events
- This is an ease-of-use accessor for event streams which should only beused when an explicit accessor is not available.no setterinherited
- onError→Stream<
Event> - Stream of
errorevents handled by thisEventSource.no setter - onMessage→Stream<
MessageEvent> - Stream of
messageevents handled by thisEventSource.no setter - onOpen→Stream<
Event> - Stream of
openevents handled by thisEventSource.no setter - readyState→int?
- no setter
- runtimeType→Type
- A representation of the runtime type of the object.no setterinherited
- url→String?
- no setter
- withCredentials→bool?
- no setter
Methods
- addEventListener(
Stringtype,EventListener?listener, [bool?useCapture])→ void - inherited
- close(
)→ void - dispatchEvent(
Eventevent)→bool - inherited
- noSuchMethod(
Invocationinvocation)→ dynamic - Invoked when a nonexistent method or property is accessed.inherited
- removeEventListener(
Stringtype,EventListener?listener, [bool?useCapture])→ void - inherited
- toString(
)→String - A string representation of this object.inherited
Operators
- operator ==(
Objectother)→bool - The equality operator.inherited
Constants
- CLOSED→ constint
- CONNECTING→ constint
- errorEvent→ constEventStreamProvider<
Event> - Static factory designed to expose
errorevents to eventhandlers that are not necessarily instances ofEventSource. - messageEvent→ constEventStreamProvider<
MessageEvent> - Static factory designed to expose
messageevents to eventhandlers that are not necessarily instances ofEventSource. - OPEN→ constint
- openEvent→ constEventStreamProvider<
Event> - Static factory designed to expose
openevents to eventhandlers that are not necessarily instances ofEventSource.