Function

JSGlobalContextCreateInGroup

Creates a global JavaScript execution context in the context group provided.

Declaration

JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClassRef globalObjectClass);

Parameters

globalObjectClass

The class to use when creating the global object. Pass NULL to use the default object class.

group

The context group to use. The created global context retains the group. Pass NULL to create a unique group for the context.

Return Value

A JSGlobalContext with a global object of class globalObjectClass and a context group equal to group.

Discussion

JSGlobalContextCreateInGroup allocates a global object and populates it with all the built-in JavaScript objects, such as Object, Function, String, and Array.

See Also

Miscellaneous

JSContextGetGlobalObject

Gets the global object of a JavaScript execution context.

JSContextGetGroup

Gets the context group to which a JavaScript execution context belongs.

JSContextGroupCreate

Creates a JavaScript context group.

JSContextGroupRelease

Releases a JavaScript context group.

JSContextGroupRetain

Retains a JavaScript context group.

JSGlobalContextCreate

Creates a global JavaScript execution context.

JSGlobalContextRelease

Releases a global JavaScript execution context.

JSGlobalContextRetain

Retains a global JavaScript execution context.