27

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.

Yet the spec definitely defines Fetch as Javascript:

The Fetch Standard also defines the fetch() JavaScript API

Source: link

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?

Ben
  • 5,085
  • 9
  • 39
  • 58
  • @BenAston It was more than just trademark ownership/licensing. [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript#JavaScript_versions) has been an instance of ECMAScript maintained by Mozilla (similar to Microsoft's JScript). They, for quite a few years, defined JavaScript with features that weren't recognized by ECMA. Though, it seems 1.8.5 and 5, respectively, helped align them. – Jonathan Lonowski May 18 '17 at 22:57
  • @BenAston - I'm not making up my own text (i.e. JavaScript), I'm directly quoting the source at WhatWg Fetch Spec that is linked to underneath the block quote. – Ben May 18 '17 at 23:01
  • @Ben Ben Ashton's comment was I think meant to be a reply to a comment I'd posted (and have deleted). – Jonathan Lonowski May 18 '17 at 23:03

3 Answers3

25

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

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).

Ben Aston
  • 53,718
  • 65
  • 205
  • 331
17

No. Most of the BOM (BrowserObjectModel) which is exposed by window object are part of WHATWG and W3C. example: navigator, ajax, fetch, etc.,

The spec for Fetch is present https://fetch.spec.whatwg.org/

If you want references in w3c look for Service Worker and search for the term http fetch

ECMASCript features will be listed in ECMA spec https://www.ecma-international.org/ecma-262/7.0/index.html

Note: BOM itself is an informal term

karthick
  • 11,998
  • 6
  • 56
  • 88
9

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:

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.

Bergi
  • 630,263
  • 148
  • 957
  • 1,375