Initializes general JS function and object classes, and the built-in object classes used in most scripts.
| || ||Pointer to the executable script context for which to initialize JS function and object classes. Requires request. In a |
| || ||The global object to initialize. This object must be of a |
as well as a few SpiderMonkey-specific globals, depending on compile-time options:
StopIteration, as of SpiderMonkey 1.7.
These global objects, functions, constructors, and constants are created as properties of
obj. As a side effect,
obj as the global object for
cx, if one is not already established. This means that scripts executed in
cx will see the properties of
obj as global variables. See
JS_SetGlobalObject for details.
obj must be of a
JSClass that has the
JS_TRUE on success, and
JS_FALSE if an error occurs.
To initialize custom classes, use