# Class type EventSource.eventSource

    class type eventSource = object .. end

    method url : string Js.t Js.readonly_prop

    method withCredentials : bool Js.t Js.readonly_prop

    method readyState : state Js.readonly_prop

    method close : unit Js.meth

    method onopen : ((< close : unit Js.meth;
               onerror : ('b Js.t, 'b messageEvent Js.t) Dom.event_listener
                         Js.writeonly_prop;
               onmessage : ('b Js.t, 'b messageEvent Js.t)
                           Dom.event_listener Js.writeonly_prop;
               onopen : 'a; readyState : state Js.readonly_prop;
               url : string Js.t Js.readonly_prop;
               withCredentials : bool Js.t Js.readonly_prop; .. >
             as 'b)
            Js.t, 'b messageEvent Js.t)
           Dom.event_listener Js.writeonly_prop as 'a

    method onmessage : ('b Js.t, 'b messageEvent Js.t) Dom.event_listener
           Js.writeonly_prop

    method onerror : ('b Js.t, 'b messageEvent Js.t) Dom.event_listener
           Js.writeonly_prop