Skip to content

Conversation

brendandahl
Copy link
Collaborator

Add a new FETCH_BACKEND setting that can either be 'xhr' or 'fetch' to use the corresponding DOM API. To keep the emscripten Fetch.js code the same I've implemented a polyfill of XMLHttpRequest using Fetch. To support streaming I wired up the fetch code to use the old onprogress code that old versions of Firefox supported.

Most of the current API is supported with some notable exceptions:

  • synchronous requests
  • overriding the mime type

I also changed a few of the tests to support both sync and async so I could test them with the fetch backend.

Add a new `FETCH_BACKEND` setting that can either be 'xhr' or 'fetch' to
use the corresponding DOM API. To keep the emscripten Fetch.js code the
same I've implemented a polyfill of XMLHttpRequest using Fetch. To support
streaming I wired up the fetch code to use the old onprogress code that
old versions of Firefox supported.

Most of the current API is supported with some notable exceptions:
 - synchronous requests
 - overriding the mime type

I also changed a few of the tests to support both sync and async so I could
test them with the fetch backend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant