Reputation: 3772
Is there any way of getting the current version of Rhino within the javascript it is interpreting?
Upvotes: 5
Views: 3735
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