Reactive-Extensions / RxJS-DOM

HTML DOM Bindings for the Reactive Extensions for JavaScript
http://reactivex.io
Other
437 stars 99 forks source link

fromEventSource with custom events #119

Open ErunamoJAZZ opened 8 years ago

ErunamoJAZZ commented 8 years ago

Hello. We are using RxJs-DOM, and this library is amazing, but, we found a problem with fromEventSource implementation:

In EventSource specification, you could use custom events, by example:

event: userconnect
data: {"username": "bobby", "time": "02:33:48"}

event: usermessage
data: {"username": "bobby", "time": "02:34:11", "text": "Hi everyone."}

event: userdisconnect
data: {"username": "bobby", "time": "02:34:23"}

event: usermessage
data: {"username": "sean", "time": "02:34:36", "text": "Bye, bobby."}

But RxJs-DOM implementation is listening only default listener (message), so... is it possible add custom listener and not only one?, that use case will be really useful in some circumstances.

Thanks!

https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events

jufmejiagu commented 8 years ago

Hi. It is due to degradation of performance by adding more and more listeners?