while
while

Reputation: 3772

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?

Upvotes: 5

Views: 3735

Answers (1)

kol
kol

Reputation: 28708

This way:

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

print(rhinoVersion);

The output for the currently stable release:

Rhino 1.7 release 4 2012 06 18

Upvotes: 11

Related Questions