We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


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.


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.


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,