JavaScript-1.5 Reference

JS_SetGlobalObject Function

Summary

Specifies the global object for an executable script context.

Syntax

void JS_SetGlobalObject(JSContext *cx, JSObject *obj);
NameTypeDescription
cxJSContext *Pointer to the executable script context for which to set the global object.
objJSObject *Pointer to the JS object to set as the global object.

Description

JS_SetGlobalObject sets the global object to obj for a specified executable script context, cx. Ordinarily you set a context's global object when you call JS_InitStandardClasses to set up the general JS function and object classes for use by scripts.

See Also

Groups [ Function ]
Documents [ LXR ID Search ]
Entries [ JSVAL_TO_OBJECT | JS_DefineObject | JS_GetFunctionObject | JS_GetGlobalObject | JS_InitStandardClasses | JS_NewObject | OBJECT_TO_JSVAL ]

This page was generated by APIDOC