Re:Managing Async Dependencies with JavaScript
by hdhzy on Saturday May 20, 2017 @02:56PM
(#14383759)
> Yes, fetch is basically sugar around XHR.
Believe it or not but currently it's actually the other way around: XHR is defined in terms of fetch:
> XHR is now defined in terms of fetch (see the calls to fetch in XHR's .send()), meaning fetch is lower level than XHR.
Source: https://jakearchibald.com/2015/thats-so-fetch/ and https://xhr.spec.whatwg.org/#the-send%28%29-method
From a user's perspective, you could create the exact same experience using vanilla XHR (which is exactly what AMD module loading does with `define`).