Creates a JavaScript context group.


func JSContextGroupCreate() -> JSContextGroupRef!

Return Value

The created JSContextGroup.


A JSContextGroup associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. Sharing and/or exchanging JavaScript objects between contexts in different groups will produce undefined behavior. When objects from the same context group are used in multiple threads, explicit synchronization is required.

See Also


func JSContextGetGlobalObject(JSContextRef!) -> JSObjectRef!

Gets the global object of a JavaScript execution context.

func JSContextGetGroup(JSContextRef!) -> JSContextGroupRef!

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

func JSContextGroupRelease(JSContextGroupRef!)

Releases a JavaScript context group.

func JSGlobalContextCreate(JSClassRef!) -> JSGlobalContextRef!

Creates a global JavaScript execution context.

func JSGlobalContextCreateInGroup(JSContextGroupRef!, JSClassRef!) -> JSGlobalContextRef!

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

func JSGlobalContextRelease(JSGlobalContextRef!)

Releases a global JavaScript execution context.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software