Sidebar

What version of JavaScript does QIE support?

0 votes
1.3K views
asked Jul 19, 2013 by ron-s-6919 (4,480 points)
What version of JavaScript does QIE support?  What is ECMAScript and what version does QIE support?

1 Answer

0 votes
 
Best answer
QIE uses the Mozilla Rhino based JavaScript engine that is included with the Java runtime.  The JavaScript version that is supported depends on which version of the Rhino engine is being used.
 
Java 6 supports the 1.6R2 Rhino version which supports JavaScript 1.5.
Java 7 supports the 1.7R3 Rhino version which supports JavaScript 1.8.
 
The Oracle versions of Java include a slightly modified version of the Rhino engine.  Details for what has been excluded can be found here for Java 6 and here for Java 7.
 
ECMAScript is the specification that the JavaScript language is based upon.  The ECMAScript edition that is supported depends on which version of JavaScript is supported.
 
JavaScript 1.5 & 1.7 support ECMAScript 3rd edition.
JavaScript 1.8 supports ECMAScript 5th edition.
 
More information about EMCAScript can be found here.
 
answered Jul 19, 2013 by ron-s-6919 (4,480 points)
selected Aug 12, 2013 by mike-r-7535
commented Jul 24, 2013 by ron-s-6919 (4,480 points)
The JavaScript array object did not introduce the indexOf() until JavaScript 1.6 ( see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf ).
commented Oct 27, 2014 by ron-s-6919 (4,480 points)
With Java 8, the Rhino based JavaScript engine has been replaced with Nashorn.  Nashorn is very similar to Rhino while being much more efficient.

Java 8 uses the Nashorn JavaScript engine which supports JavaScript 1.8 and ECMAScript 262 edition 5.1.

For details on changes that you may have to make in order for your custom scripts to run correctly, please review: https://www.qvera.com/kb/index.php/595/does-qie-run-under-java-8
...