This core language is also used in non-browser environments, for example in Node.js.
Among other things, ECMAScript defines:
- Language syntax (parsing rules, keywords, control flow, object literal initialization, ...)
- Error handling mechanisms (
try...catch, ability to create user-defined
- Types (boolean, number, string, function, object, ...)
- A prototype-based inheritance mechanism
- Built-in objects and functions, including
Math, Array methods,
- Strict mode
- A module system
- Basic memory model
ECMAScript editions are approved and published as a standard by the ECMA General Assembly on a yearly basis. All development is public on the Ecma TC39 GitHub organization, which hosts proposals, the official specification text, and meeting notes.
Before the 6th edition of ECMAScript (known as ES6), specifications were published once several years, and are commonly referred by their major version numbers — ES3, ES5, etc. After ES6, the specification is named by the publishing year — ES2017, ES2018, etc. ES6 is synonymous with ES2015. ESNext is a dynamic name that refers to whatever the next version is at the time of writing. ESNext features are more correctly called proposals, because, by definition, the specification has not been finalized yet.
The current committee-approved snapshot of ECMA-262 can be found in PDF form and HTML form. ECMA-262 and ECMA-402 are continuously maintained and kept up to date by the specification editors; the TC39 website hosts the latest, up-to-date ECMA-262 and ECMA-402 versions.
See Wikipedia ECMAScript entry for more information on ECMAScript history.
Intl object. The Internationalization specification is nowadays also ratified on a yearly basis and browsers constantly improve their implementation.
There are a variety of ways you can participate in or just track current work on the ECMAScript Language Specification and the ECMAScript Internationalization API Specification and related resources:
- ECMAScript Language Specification repo
- ECMAScript Internationalization API Specification repo
- ECMAScript proposals repo
- ECMAScript conformance test suite repo
- TC39 meeting notes
- ECMAScript spec discussion; current mailing list
- ECMAScript spec discussion; historical mailing-list archives (until March 2021)
The WebIDL specification provides the glue between the DOM technologies and ECMAScript.
The Document Object Model (DOM) is a cross-platform, language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Objects in the DOM tree may be addressed and manipulated by using methods on the objects. The W3C standardizes the Core Document Object Model, which defines language-agnostic interfaces that abstract HTML and XML documents as objects, and also defines mechanisms to manipulate this abstraction. Among the things defined by the DOM, we can find:
- The document structure, a tree model, and the DOM Event architecture in DOM core:
- A less rigorous definition of the DOM Event Architecture, as well as specific events in DOM events.
- Other things such as DOM Traversal and DOM Range.
From the ECMAScript point of view, objects defined in the DOM specification are called "host objects".
HTML, the Web's markup language, is specified in terms of the DOM. Layered above the abstract concepts defined in DOM Core, HTML also defines the meaning of elements. The HTML DOM includes such things as the
className property on HTML elements, or APIs such as
The HTML specification also defines restrictions on documents; for example, it requires all children of a
<ul> element, which represents an unordered list, to be
<li> elements, as those represent list items. In general, it also forbids using elements and attributes that aren't defined in a standard.
setIntervalfunctions were first specified on the
Windowinterface in HTML Standard.
- XMLHttpRequest makes it possible to send asynchronous HTTP requests.
- The Fetch API provides a more ergonomic abstraction for network requests.
- The CSS Object Model abstract CSS rules as objects.
- WebWorkers allows parallel computation.
- WebSockets allows low-level bidirectional communication.
- Canvas 2D Context is a drawing API for
- Google's V8, used in Google Chrome, Opera, Edge, Node.js, Deno, Electron, and more.
- Carakan, used in earlier versions of Opera.
- LibJS, used in the browser implementation of SerenityOS.
There are some engines specifically tailored for non-browser purposes:
- Moddable XS, used in embedded systems such as IoT.
- Meta's Hermes engine, an engine optimized for React Native.
- Oracle's GraalJS, a high performance implementation built on the GraalVM by Oracle Labs.
- Firefox Developer Tools
Collaboration made easy. By adding TogetherJS to your site, your users can help each other out on a website in real-time!
- Stack Overflow
JS Bin is an open-source collaborative web development debugging tool.
Codepen is another collaborative web development tool used as a live result playground.
StackBlitz is another online playground/debugging tool, which can host and deploy full-stack applications using React, Angular, etc.
RunJS is a desktop playground/scratchpad tool, which provides live results and access to both Node and Browser APIs.