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

JS_SetVersionForCompartment

This article needs a technical review. How you can help.

This article covers features introduced in SpiderMonkey 31

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

Syntax

void
JS_SetVersionForCompartment(JSCompartment *compartment, JSVersion version);
Name Type Description
compartment JSCompartment * Pointer to a JS compartment.
version JSVersion Version of JavaScript to set compartment to.

Description

JS_SetVersionForCompartment attempts to set the version of JavaScript to version for a specified compartment, compartment. The version comes from the JSVersion enumerated type.

See Also

Document Tags and Contributors

 Contributors to this page: kscarfone, arai
 Last updated by: kscarfone,