Mascara Try it Download Buy About Documentation Blog

Mascara and ECMAScript

Mascara is based on the ECMAScript standard.

ECMAScript is the official standard specification behind the language JavaScript. It is eveloped by ECMA International with participation by Mozilla, Apple, Adobe, Microsoft and others.

Strictly speaking, the name JavaScript is a trademark and only applies to Mozillas implementation of ECMAScript. But informally the name JavaScript is used for the language in general, and ECMAScript only when referring specifically to the standard.

ECMAScript 3 is the "baseline" standard which is supported by all known browsers. Mascara generates output that is ECMAScript 3 compliant.

ECMAScript 5 is the latest completed standard. It is not yet supported by all browsers. Mascara makes features from ECMAScript 5 avaliable, like the higher order array methods.

ECMAScript 6 also known as ECMAScript Harmony (sometimes shortened to ES:6 or ES:H) is still under development, and is basically a set of feature proposals. Mascara also implements a lot of these features.

Mascara tracks the development of the ECMAScript standard. But since Mascara is intended for production use, it is generally conservative when proposals change, since a draft may change back and forth several times before beeing finalized. For example the syntax for constructors have changed in current ES:H drafts, but Mascara will propably stick to the original syntax until the standard is completed, since we don't want to force our users to needlessly change code back and forth.

Some parts of the ECMAScript standards will not be implemented by Mascara. For example low level features like Object.freeze cannot be implemented in Mascara, but Mascara provides higer-level features (classes) which provides the same benefit. Other features like the proposed "weak map" is simply not possible to implement in Mascara.