Reactive-Extensions / RxJS-DOM

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

tracking `unload` events with `buffer` #120

Open jney opened 8 years ago

jney commented 8 years ago

I'm tracking events on a web page events$.buffer(/* ... */).subscribe(/* ... */). One of my source event is the event unload which generate a buffer. But i never can get the generated buffer.

const opening$ = Observable.return({})
  .concat(unload$)
  .flatMapLatest(x => Observable.timer(0, 2000))
  .skip(1)

events$.buffer(opening$).subscribe(buffer => {
  // i never go there on 'unload'
})

Any idea why ? Or how can i fix this ?