Is there any way of getting the current version of Rhino within the javascript it is interpreting?
How can I get the version of Rhino from within javascript?
Asked Answered
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
Awesome! Exactly what I was looking for! –
Borgerhout
What if the above returns null? –
Shoring
© 2022 - 2024 — McMap. All rights reserved.