Open ericfranz opened 5 years ago
This PR looks good. Set to WIP till we decide on ES6
OodAppkit.clusters
array so that we can verify that a response that might take 20 seconds to complete starts displaying jobs to the user in the jobs table almost immediately.@samirmansour its been a while since you worked on this. But now I'm thinking we should add polyfills to get this working in IE11 - if it works there, then it would work in older versions of Firefox Chrome and Edge that don't support fetch and other es6-isms...
https://github.com/github/fetch looks promising. Is that all that is needed here? Maybe...
content type needs to be "application/x-ndjson"
Fixes #179
This is a complete working switch to using ndjson to stream the data (verified on MSEdge 18) using the https://github.com/canjs/can-ndjson-stream library
One of the issues is there are multiple polyfills to support this in older browsers, this library uses TextEncoder which is not supported in MSEdge, and the polyfill for TextEncoder is archived project. Before merging, we may want to ask the canjs or donejs community (or post an issue directly) about this dependency issue.
Since this is part of the https://canjs.com/ project which is part of the https://donejs.com/ you would expect that there would be a solution to have this work in the browsers, since https://donejs.com claims to support all browsers.
Note: the one reason of moving to this is to remove the dependency off of http://oboejs.com/.