SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
EventSource provides a text-based stream abstraction for JavaScript.
Field Summary | |
Function
|
onerror
The onerror handler is called when the stream has a network or server error. |
Function
|
onmessage
The onmessage handler is called when data arrives. |
Function
|
onopen
The onopen handler is called when the stream is established. |
Number
|
readyState
The ready state indicates the stream status, Possible values are 0 (CONNECTING), 1 (OPEN) and 2 (CLOSED) |
Constructor Summary | |
EventSource(location)
Creates a new EventSource instance and connects to the stream location. |
Method Summary | |
void
|
disconnect()
Disconnects the stream. |
Field Detail |
Function onerror
Function onmessage
Function onopen
Number readyState
Constructor Detail |
EventSource(location)
String location
- the stream location
Method Detail |
void disconnect()
void