Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

JS_SetVersion

Obsolete since JSAPI 25
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Configure a JSContext to use a specific version of the JavaScript language.

Syntax

JSVersion
JS_SetVersion(JSContext *cx, JSVersion version);
Name Type Description
cx JSContext * Pointer to a JS context from which to derive runtime information.
version JSVersion Version of JavaScript to set context to.

Description

JS_SetVersion attempts to set the version of JavaScript to version for a specified executable script context, cx. The version comes from the JSVersion enumerated type.

JS_SetVersion returns the JS version in effect for the context before you changed it.

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, Jorend, Jimb, Cheatah, Dria, MMondor
 Last updated by: arai,