Contact emails
Engineering: yhi...@chromium.org, tyos...@chromium.org, ho...@chromium.org
Spec
https://fetch.spec.whatwg.org/#fetch-api
Summary
The Fetch API is a new API for loading resources in web applications and is intended to supersede XMLHttpRequest. Fetch API is already available in ServiceWorker scope. This Intent to Ship is for exposing it on window and (shared)worker scopes.
Advantages over XHR:
Promises based async operations
finer level of control
upcoming integrations with other APIs. For instance, in a follow-up Intent to Ship, an integration with the Streams API [1] will improve the state of progressive processing of data: no need to poll as you would with XHR and it will let you stream Binary content too.
API level detail (includes known caveats)
Link to “Intent to Implement” blink-dev discussion
N/A. (Fetch API was implemented as a part of ServiceWorker)
Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
Yes
Demo link
Prerequisite: Chrome Canary with chrome://flags/#enable-experimental-web-platform-features enabled
http://addyosmani.com/demos/fetch-api/
Debuggability
On par with XMLHttpRequest.
Compatibility Risk: pluses and minuses
+ There is a WHATWG spec for the Fetch API.
+ Mozilla is implementing this API (available in nightly behind dom.fetch.enabled; issue tracker).
+ Fetch API has already shipped in M40 (in Service Worker)
+ No additional surface exposed for the Fetch API
+ Data indicates that exposing fetch in the global scope is safe (e.g. collisions with id=fetch)
+ Canary is doing great on Mozilla’s tests for Fetch API in window:
= actual failures are on aspects we don’t support yet (e.g. schemes such as about, data, blob)
+ a few false positives caused by this implementation bug in Firefox
- a few Firefox specific tests that are hard to get running (e.g. test_headers.html relies on internal APIs, some no cors tests relying on a non-public test server)
- some side issues got in the way of running our Fetch API tests against Firefox’s implementation (e.g. missing ES6 features, not yet implemented Fetch API key features for our tests).
Tracking bug
Link to entry on the feature dashboard
https://www.chromestatus.com/features/6730533392351232
[1] https://streams.spec.whatwg.org/
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Could you give more details on the data showing why this change to the global scope is web compatible?
On Fri Jan 30 2015 at 2:27:20 AM Anne van Kesteren <ann...@annevk.nl> wrote:On Fri, Jan 30, 2015 at 11:20 AM, Takeshi Yoshino <tyos...@chromium.org> wrote:
> fetch()
> - ignores Request.cache
> -- Reason: Needs to resolve privacy leak concern. See this issue
Feedback welcome by the way. mnot suggested the risk is about the same
with timing attacks.
> - fails (rejects the returned Promise with a TypeError) if Request.mode is
> no-cors
> -- Reason: Needs to resolve security concern. See this issue
Given that you are shipping this in service workers your decision here
seems extremely awkward and I don't really understand it.
--
https://annevankesteren.nl/
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.