我正在使用 fetch 进行 api 调用,但在 "Mozilla Firefox Version 17.0" 中不起作用

I am using fetch to make an api call that is not working in "Mozilla Firefox Version 17.0"

您好,我的 Javascript 代码有问题。我正在使用 fetch 进行 API 调用。我在我的地图上显示了响应。它适用于所有浏览器,但不适用于 "Mozilla Firefox Version 17.0"。我想在这个版本中使用它,我可以为这个版本的浏览器找到什么解决方案。

           fetch('https://xzy.example.api)
           .then(function(response) {
                   return response.json();
           })

fetchintroduced in Firefox 39. MDN links to this polyfill

它在 Firefox 17 中不受原生支持(您不应该使用它,因为它很古老 (release date: November 20, 2012) 并且比最新的安全更新落后很多年)。

Fetch 在 FireFox 17

版本中 not-supported