Is the Fetch API an ECMAscript feature?

前端 未结 3 2070
暗喜
暗喜 2020-12-30 02:39

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

3条回答
  •  灰色年华
    2020-12-30 03:35

    I can't figure out if the Fetch API is part of ECMAScript 5, 6, 7 or otherwise

    For that you need to contact the respective ES specs:

    • http://www.ecma-international.org/ecma-262/5.1/
    • http://www.ecma-international.org/ecma-262/6.0/
    • http://www.ecma-international.org/ecma-262/7.0/

    No, fetch is not part of them. They only define the language (syntax and semantics) and a few builtin objects. You can implement a compliant JS engine it without providing fetch.

    The Fetch standard is part of the web platform, underlying several other web standards. It states that it "also defines the fetch() JavaScript API" - and it's just that, and API for the JavaScript language.

提交回复
热议问题