Logo Questions Linux Laravel Mysql Ubuntu Git Menu

How can I get the version of Rhino from within javascript?

Is there any way of getting the current version of Rhino within the javascript it is interpreting?

like image 996
while Avatar asked Dec 25 '22 10:12


1 Answers

This way:

var Context = org.mozilla.javascript.Context,
    currentContext = Context.getCurrentContext(),
    rhinoVersion = currentContext.getImplementationVersion();


The output for the currently stable release:

Rhino 1.7 release 4 2012 06 18
like image 133
kol Avatar answered Dec 28 '22 06:12