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 an

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 fet