EventSource class
- Inheritance
- Object
- JSObject
- DartHtmlDomObject
- EventTarget
- EventSource
- Annotations
- @DomName('EventSource')
- @Experimental()
Constants
- CLOSED → int @DocsEditable(), @DomName('EventSource.CLOSED')
-
2
- CONNECTING → int @DocsEditable(), @DomName('EventSource.CONNECTING')
-
0
- errorEvent → EventStreamProvider<Event> @DocsEditable(), @DomName('EventSource.errorEvent')
-
Static factory designed to expose
error
events to event handlers that are not necessarily instances of EventSource.const EventStreamProvider<Event>
('error') - messageEvent → EventStreamProvider<MessageEvent> @DocsEditable(), @DomName('EventSource.messageEvent')
-
Static factory designed to expose
message
events to event handlers that are not necessarily instances of EventSource.const EventStreamProvider<MessageEvent>
('message') - OPEN → int @DocsEditable(), @DomName('EventSource.OPEN')
-
1
- openEvent → EventStreamProvider<Event> @DocsEditable(), @DomName('EventSource.openEvent')
-
Static factory designed to expose
open
events to event handlers that are not necessarily instances of EventSource.const EventStreamProvider<Event>
('open')
Static Properties
- instanceRuntimeType → Type @Deprecated("Internal Use Only"), read-only
Constructors
- EventSource(String url, { withCredentials: false }) factory
- EventSource.internal_()
Properties
- onError → Stream<Event> @DocsEditable(), @DomName('EventSource.onerror'), read-only
-
Stream of
error
events handled by thisEventSource
. - onMessage → Stream<MessageEvent> @DocsEditable(), @DomName('EventSource.onmessage'), read-only
-
Stream of
message
events handled by thisEventSource
. - onOpen → Stream<Event> @DocsEditable(), @DomName('EventSource.onopen'), read-only
-
Stream of
open
events handled by thisEventSource
. - readyState → int @DocsEditable(), @DomName('EventSource.readyState'), read-only
- url → String @DocsEditable(), @DomName('EventSource.url'), read-only
- withCredentials → bool @DocsEditable(), @DomName('EventSource.withCredentials'), read-only
- hashCode → int read-only, inherited
- on → Events 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.
- runtimeType → Type read-only, inherited
-
A representation of the runtime type of the object.
Operators
- operator ==(
other) → bool inherited -
The equality operator.
Methods
- close(
) → void @DocsEditable(), @DomName('EventSource.close') - addEventListener(
String type, EventListener listener, [ bool useCapture ]) → void inherited - dispatchEvent(
Event event) → bool @DocsEditable(), @DomName('EventTarget.dispatchEvent'), inherited - noSuchMethod(
Invocation invocation) → dynamic inherited -
Invoked when a non-existent method or property is accessed.
- removeEventListener(
String type, EventListener listener, [ bool useCapture ]) → void inherited - toString(
) → String inherited -
Returns the result of the JavaScript objects
toString
method.
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-html/EventSource-class.html