Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29333518: Issue 3515 - Added polyfill for the fetch() API (Closed)

Created:
Jan. 14, 2016, 5:21 p.m. by Sebastian Noack
Modified:
Jan. 19, 2016, 4:41 p.m.
Reviewers:
kzar
Visibility:
Public.

Description

Issue 3515 - Added polyfill for the fetch() API

Patch Set 1 #

Patch Set 2 : Rebased, fixed IIFE, handle onerror #

Patch Set 3 : Use strict mode #

Total comments: 8

Patch Set 4 : Override mime type, handle onabort #

Total comments: 3

Patch Set 5 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -0 lines) Patch
A lib/polyfills/fetch.js View 1 2 3 4 1 chunk +61 lines, -0 lines 0 comments Download
M metadata.common View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6
Sebastian Noack
Jan. 14, 2016, 5:58 p.m. (2016-01-14 17:58:49 UTC) #1
kzar
https://codereview.adblockplus.org/29333518/diff/29333623/lib/polyfill/fetch.js File lib/polyfill/fetch.js (right): https://codereview.adblockplus.org/29333518/diff/29333623/lib/polyfill/fetch.js#newcode18 lib/polyfill/fetch.js:18: "use strict"; Like in the other review, shouldn't this ...
Jan. 15, 2016, 7:35 p.m. (2016-01-15 19:35:19 UTC) #2
Sebastian Noack
https://codereview.adblockplus.org/29333518/diff/29333623/lib/polyfill/fetch.js File lib/polyfill/fetch.js (right): https://codereview.adblockplus.org/29333518/diff/29333623/lib/polyfill/fetch.js#newcode18 lib/polyfill/fetch.js:18: "use strict"; On 2016/01/15 19:35:18, kzar wrote: > Like ...
Jan. 19, 2016, 1:09 p.m. (2016-01-19 13:09:32 UTC) #3
kzar
https://codereview.adblockplus.org/29333518/diff/29333623/lib/polyfill/fetch.js File lib/polyfill/fetch.js (right): https://codereview.adblockplus.org/29333518/diff/29333623/lib/polyfill/fetch.js#newcode18 lib/polyfill/fetch.js:18: "use strict"; On 2016/01/19 13:09:31, Sebastian Noack wrote: > ...
Jan. 19, 2016, 3:03 p.m. (2016-01-19 15:03:24 UTC) #4
Sebastian Noack
https://codereview.adblockplus.org/29333518/diff/29333958/lib/polyfill/fetch.js File lib/polyfill/fetch.js (right): https://codereview.adblockplus.org/29333518/diff/29333958/lib/polyfill/fetch.js#newcode56 lib/polyfill/fetch.js:56: xhr.overrideMimeType("text/plain"); On 2016/01/19 15:03:24, kzar wrote: > I'm curious, ...
Jan. 19, 2016, 3:08 p.m. (2016-01-19 15:08:29 UTC) #5
kzar
Jan. 19, 2016, 3:41 p.m. (2016-01-19 15:41:02 UTC) #6
LGTM

https://codereview.adblockplus.org/29333518/diff/29333958/lib/polyfill/fetch.js
File lib/polyfill/fetch.js (right):

https://codereview.adblockplus.org/29333518/diff/29333958/lib/polyfill/fetch....
lib/polyfill/fetch.js:56: xhr.overrideMimeType("text/plain");
On 2016/01/19 15:08:29, Sebastian Noack wrote:
> On 2016/01/19 15:03:24, kzar wrote:
> > I'm curious, why do this?
> 
> Otherwise, XMLHttpRequest would try to parse the response if it is XML, HTML
of
> JSON. However, fetch() doesn't do any automatic parsing. So the parsed result
is
> ignored anyway, and if necessary the document would be parsed twice.

Acknowledged.

Powered by Google App Engine
This is Rietveld