Fetch API 是 ECMAscript 功能吗? [英] Is the Fetch API an ECMAscript feature?

查看:26
本文介绍了Fetch API 是 ECMAscript 功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里浏览了 MDN 资源以及此处,以及WhatWg Fetch Spec,尽管如此,我无法确定 Fetch API是 ECMAScript 5、6、7 或其他版本的一部分.

I've looked through the MDN resources here as well as here, as well as the WhatWg Fetch Spec, and for all that I can't figure out if the Fetch API is part of ECMAScript 5, 6, 7 or otherwise.

我只能说它没有在浏览器中一致地实现,并且在某些情况下是 不支持全部.

All I can tell is that it isn't implemented consistently across browsers, and in some cases is not supported at all.

然而规范明确地将 Fetch 定义为 Javascript:

Yet the spec definitely defines Fetch as Javascript:

Fetch 标准还定义了 fetch() JavaScript API

The Fetch Standard also defines the fetch() JavaScript API

来源:链接

Fetch API 是否仅仅是 ES 7/8 尚未在书本上提出的提案,还是它实际上是 ES6/7/8 的一部分而我的谷歌搜索技能失败了?

Is the Fetch API simply a proposal that is not on the books yet for ES 7/8, or is it actually part of ES6/7/8 and my Googling skills have failed me?

推荐答案

没有.它是标准机构 WHATWG 和 W3C 定义的 Web 平台 API 的一部分.

No. It's part of the Web platform API defined by the standards bodies WHATWG and W3C.

实现 Fetch API 的各种对象是宿主对象".即向用户态 JavaScript 公开的对象,这些对象由托管运行时的应用程序(通常是浏览器)提供.

The various objects that implement the Fetch API are "host objects". i.e. objects exposed to userland JavaScript that are provided by the application hosting the runtime (usually a browser).

这篇关于Fetch API 是 ECMAscript 功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆