Visit Mozilla.org

JS SetVersion

From MDC

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

[edit] 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.

[edit] 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.

[edit] See Also

LXR ID Search for JS_SetVersion

JSVersion, JS_GetVersion, JS_VersionToString, JS_StringToVersion