Which version of the ECMAScript standard does Java's JavaScript engine Rhino support, how much work is going into fixing bugs and keeping the implementation in sync with the latest standardized version?
ECMAScript support different object on each version. To detect the ECMAScript version we can check the object exits into a browser or not. If that object is identified that means ECMA Version supported into the browser.
This is a matter of architecture rather than a simple functional change. Unfortunately ServiceNow uses the ageing Mozilla Rhino server side JavaScript engine.
JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997. ECMAScript is the official name of the language. ECMAScript versions have been abbreviated to ES1, ES2, ES3, ES5, and ES6. Since 2016 new versions are named by year (ECMAScript 2016 / 2017 / 2018).
From what is written in the release notes of the versions of Rhino:
It seems that Rhino versions, Mozilla's JavaScript versions and ECMA Script versions are very different in scope.
The question was asked in 2011, and the JDK (as of late fall 2015) no longer ships with Rhino at all; the question referred to JDK 1.6, though JDK 1.7 was released a couple weeks afterwards.
Nashorn in JDK 1.8 60 supports ES 5.1, possibly with a couple of ES2015 extensions; it's hard to find an explicit compatibility claim from Oracle sources. Supposedly, JDK 9 Nashorn is supposed to "fully support" ES2015, but again I've been unsuccessful locating official sources.
Below is the original answer.
Rhino in the shipped JDK (from Sun) is version 1.6R2. It's ancient. Supposedly it's going to be updated in the 1.7 release.
You can always download Rhino from Mozilla and use their integration facility. I've used the Sun one, and while it's dirt simple it leaves a lot to be desired.
edit — as to which ECMAScript standard it is, well, it's a Mozilla release so they've got their own modifications. However 1.6R2 is so old that it doesn't even have things like ".forEach()".
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