Entry:JS_GetVersion (Function) Summary: Retrieves the JavaScript version number used within a specified executable script context. Syntax:
JSVersion JS_GetVersion(JSContext *cx);
Description: JS_GetVersion reports an encapsulated JavaScript version number used within a specified JSContext, cx. The version number is an enumerated value that corresponds to the JavaScript version string with which JS users are familiar.
If JSVERSION_DEFAULT is returned by JS_GetVersion, it indicates that the current script does not provide a version number and that the script is executed using the last known version number. If that version number is unknown because a script without a specified version is the first to execute, JS_GetVersion still returns JSVERSION_DEFAULT.