ReactiveX / rxjs

A reactive programming library for JavaScript
https://rxjs.dev
Apache License 2.0
30.7k stars 3k forks source link

Observable.from('string') browser compatibility #1147

Closed kwonoj closed 8 years ago

kwonoj commented 8 years ago

Observable.from can take string and iterate it as

Rx.Observable.from('foo').subscribe(console.log);
// => Next: f
// => Next: o
// => Next: o
// => Completed

but fails to do it on some browsers does not support string iterator (IE, for example)

in RxJS4, seems it has own iterator for string object (https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/linq/observable/from.js#L3-L23) to support this behavior - does RxJS5 need to port same behavior?

I've used https://jsfiddle.net/v0w220v6/ to test out between different browsers.

kwonoj commented 8 years ago

related to https://github.com/ReactiveX/RxJS/issues/998 .

benlesh commented 8 years ago

I believe some of the infrastructure for this is already in place. So there might be a bug.

kwonoj commented 8 years ago

I assume it's StringIteratror in IteratorObservable, will try to look into what's happening. Marking this as bug meanwhile.

lock[bot] commented 6 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.