module EventSource: sig
.. end
EventSource binding
type
state =
| |
CONNECTING |
| |
OPEN |
| |
CLOSED |
class type ['a]
messageEvent = object
.. end
class type eventSource = object
.. end
class type options = object
.. end
val withCredentials : bool -> options Js.t
val eventSource : (Js.js_string Js.t -> eventSource Js.t) Js.constr
val eventSource_options : (Js.js_string Js.t ->
options Js.t -> eventSource Js.t)
Js.constr
val addEventListener : (#eventSource as 'a) Js.t ->
'b Dom.Event.typ ->
('a Js.t, 'b) Dom.event_listener -> bool Js.t -> Dom.event_listener_id
Add an event listener. This function matches the
addEventListener
DOM method, except that it returns
an id for removing the listener.