What would happen if I start to define my script tags as ECMA? Will it execute to a different standard?
Does anyone actually use ECMA script instead of straight up Javascript...?
JavaScript is a general-purpose scripting language that conforms to the ECMAScript specification. The ECMAScript specification is a blueprint for creating a scripting language. JavaScript is an implementation of that blueprint. On the whole, JavaScript implements the ECMAScript specification as described in ECMA-262.
JavaScript is a language based on ECMAScript. A standard for scripting languages like JavaScript, JScript is ECMAScript. JavaScript is considered as one of the most popular implementations of ECMAScript.
ECMAScript = ES: ECMAScript is a Standard for scripting languages. Languages like Javascript are based on the ECMAScript standard. ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape) and JScript (Microsoft). ECMA means European Computer Manufacturer's Association.
JavaScript ES6 (also known as ECMAScript 2015 or ECMAScript 6) is the newer version of JavaScript that was introduced in 2015. ECMAScript is the standard that JavaScript programming language uses. ECMAScript provides the specification on how JavaScript programming language should work.
ECMAScript is a standard. JavaScript is an implementation of that standard (edition 3 of that standard to be more exact).
Other implementations of ECMAScript are ActionScript and JScript.
Also note that there isn't one JavaScript. Each JavaScript engine may implement its own version of the language as long as it meets the ECMAScript requirements. This means that browsers (JS engines) may have additional functionality, but they all must have the base ECMAScript functionality.
And now, to answer your question, according to RFC 4329, if the media type is set to application/ecmascript
, rather than application/javascript
, it must adhere to a stricter standard.
This document defines equivalent processing requirements for the types text/javascript, text/ecmascript, and application/javascript. Use of and support for the media type application/ecmascript is considerably less widespread than for other media types defined in this document. Using that to its advantage, this document defines stricter processing rules for this type to foster more interoperable processing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With