Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser support for this library #43

Open
kanteankit opened this issue Nov 15, 2018 · 1 comment
Open

Browser support for this library #43

kanteankit opened this issue Nov 15, 2018 · 1 comment
Labels

Comments

@kanteankit
Copy link

Can anyone tell me how do I use this library in Firefox, Edge and Safari browsers.

Firefox does not support ReadableStream and throws the error: ReadableStream is not defined.

Edge throws error Function expected, when reading data using ndjsonStream function of this library.

Does anyone have any workarounds or any polyfill that I can use to make it work in these browsers?

@justinbmeyer
Copy link
Contributor

Hmm. Seems like FF 57 put it behind a flag. Also it seems like it should be possible to make edge work now: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#Browser_compatibility

It might be possible to polyfill. Currently, we fix this on a data layer above fetch (can-connect). A polyfill would basically do a normal fetch that waits for everything and just emit data once on the stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants