EventSource Interface
The EventSource
interface is used to manage server-sent events. You can set the onmessage attribute to a JavaScript function to receive non-typed messages (that is, messages with no event
field). You can also call addEventListener()
to listen for events just like any other event source.
See Using server-sent events for further details.
Extends
Constructors
Static Fields
Methods
Code void close() #
readyState
attribute to CLOSED
. If the connection is already closed, the method does nothing.
void close();
Code EventSourceEvents get on() #
EventSourceEvents get on();
Code void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) #
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]);
Code void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) #
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]);
Fields
This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.