JS GetGlobalObject
From MDC
Retrieves a context's global object. (In JavaScript, global variables are stored as properties of the global object.)
[edit] Syntax
JSObject * JS_GetGlobalObject(JSContext *cx);
| Name | Type | Description |
|---|---|---|
cx |
JSContext * |
The context from which to retrieve the global object. |
[edit] Description
JS_GetGlobalObject retrieves the global object for a specified JSContext, cx. This returns NULL if cx has no global object.
Use JS_SetGlobalObject to replace the global object.