JS SetVersion

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


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.


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

MXR ID Search for JS_SetVersion

JSVersion, JS_GetVersion, JS_VersionToString, JS_StringToVersion

Document Tags and Contributors

Last updated by: Jorend,