What is the difference between Javascript and ECMA script?

What happens if I start to define script tags as ECMA? Will it be implemented with a different standard?

Does anyone really use an ECMA script instead of direct Javascript ...?

+13
javascript
Nov 24 '10 at 21:23
source share
2 answers

ECMAScript is the standard. JavaScript is an implementation of this standard (more precisely, option 3 of this standard).

Other implementations of ECMAScript are ActionScript and JScript.

Also note that there is no JavaScript. Each JavaScript engine can implement its own version of the language if it meets the requirements of ECMAScript. This means that browsers (JS engines) may have additional features, but all must have the basic functionality of ECMAScript.

And now, to answer your question, in accordance with RFC 4329 , if the media type is set to application/ecmascript and not application/javascript , it must adhere to a more strict standard.

This document defines the equivalent processing requirements for the text / javascript, text / ecmascript, and application / JavaScript types. The use and support of the type of media application / excript is much less common than for other types of media defined in this document. By using what is in its favor, this document defines stricter processing rules for this type contributing to more interoperable processing.

+27
Nov 24 '10 at 21:25
source share

ECMAScript is a standard programming language such as lisp. Javascript is an implementation of such as well as functions other than ECMAScript, such as the DOM. ActionScript (for Flash) is another one. Just as writing in "lisp" means writing in some dialect, such as Common Lisp or Scheme, actually writing the right ECMAScript can be not only pointless, but unsuitable for use in dialects (although I think ActionScript 3 and recent JavaScript apply the entire ECMAScript standard).

+3
Nov 24 '10 at 21:28
source share



All Articles