Re: Service Worker does not allow XMLHttpRequest

2018-02-13 Thread Lucas Pardue
Hi Alon, Thanks for the feedback. I'm not sure legacy vm support is. Looking at the code, it seems that XHR is used in the browser environment (ENVIRONMENT_IS_WEB, ENVIRONMENT_IS_WORKER), so replacing XHR with Fetch is possible and preferred. Feature detection could be used to detect Fetch

Re: Service Worker does not allow XMLHttpRequest

2018-02-12 Thread Alon Zakai
Interesting, I didn't know Service Workers disallowed XHRs but allow fetch. Then yes, we should use fetch where it is available. The place to fix this is in src/shell.js, in readAsync. Apparently fetch is in all modern browsers now, https://caniuse.com/#search=fetch so we can probably just use

Service Worker does not allow XMLHttpRequest

2018-02-09 Thread Lucas Pardue
Hi, We have a little project that we've run through emscripten and it produces an asm.js output called example.js, and example.js.mem. Inside example.js is the generated function fetchRemotePackage(), which uses XMLHttpRequest (XHR is also used elsewhere in example.js). I've tried to use this