How do JavaScript, ECMAScript and the ECMA-262 specification relate to an engine, and why can a specified feature be missing from your runtime?
answer
- a document versus running software
- the committee, the standard, the implementers
- host embeds one engine version
- feature by feature, not edition by edition
- check what your users actually run
basics
~20 sECMAScript, defined in ECMA-262, is the written standard for JavaScript, and engines such as V8 implement it. Publishing a feature in the standard installs nothing, so your runtime has it only once its engine version ships it.
solid answer
~50 sECMA-262 is the document that defines ECMAScript, the standardized core of JavaScript, and TC39 is the Ecma committee that maintains it. It states requirements and runs nothing. Engines such as V8, SpiderMonkey and JavaScriptCore implement those requirements, and a host such as a browser or Node embeds one engine at a particular version. So "is it in the spec?" and "can I run it?" are separate questions. Engines generally ship features one at a time on their own schedules rather than edition by edition, so a feature can be in the standard yet absent from an older browser, a pinned Node release or an engine that has not got to it. The reverse also happens: features often ship before the edition naming them is published. What to check is support in the engine versions your users actually run, not the edition number.
go deeper
Keep the layers straight: ECMA-262 is a document, ECMAScript is what it defines, TC39 writes it, an engine implements it, and a host embeds the engine. A feature in the document is not yet a feature on your machine.
Explain the chain between the text and running code: engine team, host release, then the upgrade. Know that engines ship per feature, so edition numbers do not describe a runtime.
Treat this as a support question about a concrete population of runtimes. Ask which browsers and Node releases run the code and check per-feature data, rather than quoting an edition.
The tradeoff is who carries the cost of old runtimes. Decide which versions your product commits to supporting, because that decision, not the specification, sets what the team may use natively.
## Four words that are easy to blur - **JavaScript** is the language people write. In a browser the word is often an umbrella for the core language plus the web APIs around it. - **ECMAScript** is the name of the standardized core language: syntax, types, built-in objects such as `Array` and `Math`, strict mode, the module system. - **ECMA-262** is the specification document that defines ECMAScript, published by Ecma International and also approved by ISO as ISO 16262. - **TC39** is the Ecma technical committee that evolves the language and authors that specification. Then come the things that actually run code. - An **engine**, such as V8, SpiderMonkey or JavaScriptCore, parses and executes JavaScript and implements the specification's requirements. - A **host**, such as a browser or Node, embeds an engine at a specific version and adds its own APIs around it. ECMA-262 is written for people implementing engines, and it is not a tutorial for people writing scripts. It also has edges. It does not describe the DOM, which is standardized elsewhere, and the internationalization API has its own specification, ECMA-402. So a missing API is not always an engine question at all, though this page stays with the language core. ## Why a specified feature can be missing A specification is a set of requirements, and nothing in it updates the software on anyone's machine. Between the text and your running code sit several independent decisions: 1. **The engine team decides when to implement it.** Each engine has its own priorities and release schedule. 2. **The host decides which engine version to embed.** A browser release or a Node release fixes that version. 3. **The operator or user decides when to upgrade.** A server may be pinned to an old Node release, and a customer may keep an old browser or device for years. So a very common explanation for a `TypeError` on a specified method, or a `SyntaxError` on specified syntax, is simply that the engine version running that code predates the feature. TC39 develops a new feature as a proposal that climbs a series of stages. A proposal-sized feature normally cannot reach Stage 4, the last step before standardization, without two compatible implementations that pass **Test262**, the official conformance test suite for ECMAScript. That sets a floor, not a promise of universal support. It shows that two implementations exist somewhere. It says nothing about the third engine, and nothing about the version your customer has. ## Support is not all-or-nothing per edition Saying that a runtime "supports ES2020" is loose shorthand. Engines generally ship features individually, so at a given moment an engine can have most of one edition, part of the next, and something from a proposal that has not yet reached any edition. | Claim | Is it reliable? | |---|---| | This feature is in ES2022, so current browsers have it | No. Check each engine and version you target | | This engine has a feature from ES2023, so it has all of ES2022 | No. Features do not ship in edition order | | This feature is not in any edition yet, so no engine has it | No. Engines typically implement at stage 3 or stage 4 | | This browser version maps to one edition | No. Versions and editions are unrelated numbering schemes | The third row is the one people find surprising. Engines implementing before publication is the design of the process, because implementation experience is the evidence that a proposal needs in order to finish. By the time an edition is approved, its features have usually been running somewhere for a while. ## How to get a real answer When someone asks whether a language feature is available, break the question down: - **Which runtimes?** List the browsers, devices and Node releases that will actually run this code. - **Which engine versions do they carry?** Compatibility tables in the reference documentation report per feature and per version, which is the granularity that matters. - **What happens where it is missing?** The answer differs for syntax and for runtime APIs, and that is a decision of its own. Reasoning from the edition number skips all three questions, which is why it produces confident wrong answers.
- If Stage 4 requires two implementations, how can a standardized feature still be missing?Two compatible implementations is a floor for the process, not a promise of universal support. A third engine may not have implemented it yet, and even engines that have will not reach users on older versions. Your users' browsers and your pinned Node release decide what runs.
- Does ECMA-262 define the DOM?No. The ECMAScript specification covers the core language: syntax, types and built-ins such as `Array` and `JSON`. The DOM is standardized separately, and the host exposes it to scripts. So something that works in every browser is not necessarily part of ECMAScript at all.
- Why might a runtime stay without a feature even after its engine project has shipped it?A host embeds one engine version, so the feature arrives only with a host release that carries a new enough engine. Then someone still has to upgrade. A server pinned to an older Node release, or a customer on an old browser, stays without it indefinitely.
ECMA-262 is like a published cookbook and engines are restaurants. Printing a recipe puts no dish on any menu: each kitchen adds it when it chooses, some before the book is out, and your customer eats at whichever branch they happen to be in.
- If a feature is in the latest edition, every current browser supports it.
- Engines implement one whole edition at a time, so support for an edition is all or nothing.
- ECMA-262 also defines the DOM and the document object.
- Nothing can be used anywhere until its edition has been published.
- A browser's version number maps to exactly one ECMAScript edition.
- Stage 4 means every major engine has shipped the feature.