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

Unified Diff: lib/polyfills/fetch.js

Issue 29345235: Issue 4085 - Fallback to XMLHttpRequest if Fetch API is not supported in Edge (Closed)
Patch Set: Created May 29, 2016, 2:33 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/polyfills/fetch.js
diff --git a/lib/polyfills/fetch.js b/lib/polyfills/fetch.js
index 0a835aff926bb272e02868ea4fbe162cf8217b80..d23ace7ea835acf0eac3eed37203202f7ea4ae6c 100644
--- a/lib/polyfills/fetch.js
+++ b/lib/polyfills/fetch.js
@@ -65,7 +65,8 @@
{
return builtinFetch(url, init).catch(function(reason)
{
- if (new URL(url, document.URL).protocol == "chrome-extension:")
+ var protocol = new URL(url, document.URL).protocol;
+ if ((protocol == "chrome-extension:") || (protocol == "ms-browser-extension:"))
kzar 2016/08/22 15:47:20 Nit: Mind wrapping this at the || to avoid the lin
kzar 2016/08/22 15:47:20 Not sure what Sebastian thinks but maybe we should
return fetch(url);
throw reason;
});
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld