MDN’s new design is in Beta! A sneak peek:


Obsolete since JSAPI 27
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.

Toggle specified options on a JSContext.


JS_ToggleOptions(JSContext *cx, uint32 options);
Name Type Description
cx JSContext * A context on which to modify options.
options uint32 The set of options to toggle. This is the logical OR of zero or more flags described at JS_SetOptions.


JS_ToggleOptions toggles context-wide options. It is equivalent to JS_SetOptions(cx, JS_GetOptions(cx) ^ options).

See Also

Document Tags and Contributors

 Contributors to this page: arai, fscholz, Jorend
 Last updated by: arai,