extern class js.html.EventSourceextends EventTargetAvailable in js

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.

Documentation for this class was provided by MDN.
var URL(default,null) : String var onerror : EventListenerA JavaScript function to call when an error occurs. var onmessage : EventListenerA JavaScript function to call when an a message without an event field arrives. var onopen : EventListenerA JavaScript function to call when the connection has opened. var readyState(default,null) : IntThe state of the connection, must be one of CONNECTING, OPEN, or CLOSED. Read only. var url(default,null) : StringRead only. function new() : Void function close() : Void static inline var CLOSED : IntThe connection is not being established, has been closed or there was a fatal error. static inline var CONNECTING : IntThe connection is being established. static inline var OPEN : IntThe connection is open and dispatching events.
version #18265, modified 2013-05-01 11:57:23 by api
0 comment