|
Mac Dev Center
Mac OS X Reference Library Networking, Internet, & Web JavaScriptCore Framework Reference
|
JSContextRef.h |
| Includes: | <JavaScriptCore/JSObjectRef.h> <JavaScriptCore/JSValueRef.h> <JavaScriptCore/WebKitAvailability.h> <stdbool.h> |
Use the links in the table of contents to the left to access the documentation.
Gets the global object of a JavaScript execution context.
Gets the context group to which a JavaScript execution context belongs.
Creates a JavaScript context group.
Releases a JavaScript context group.
Retains a JavaScript context group.
Creates a global JavaScript execution context.
Creates a global JavaScript execution context in the context group provided.
Releases a global JavaScript execution context.
Retains a global JavaScript execution context.
JSContextGetGlobalObject |
Gets the global object of a JavaScript execution context.
JS_EXPORT JSObjectRef JSContextGetGlobalObject( JSContextRef ctx);
ctxThe JSContext whose global object you want to get.
ctx's global object.
JSContextGetGroup |
Gets the context group to which a JavaScript execution context belongs.
JS_EXPORT JSContextGroupRef JSContextGetGroup( JSContextRef ctx) AVAILABLE_IN_WEBKIT_VERSION_4_0;
ctxThe JSContext whose group you want to get.
ctx's group.
JSContextGroupCreate |
Creates a JavaScript context group.
JS_EXPORT JSContextGroupRef JSContextGroupCreate() AVAILABLE_IN_WEBKIT_VERSION_4_0;
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.
JSContextGroupRelease |
Releases a JavaScript context group.
JS_EXPORT void JSContextGroupRelease( JSContextGroupRef group) AVAILABLE_IN_WEBKIT_VERSION_4_0;
groupThe JSContextGroup to release.
JSContextGroupRetain |
Retains a JavaScript context group.
JS_EXPORT JSContextGroupRef JSContextGroupRetain( JSContextGroupRef group) AVAILABLE_IN_WEBKIT_VERSION_4_0;
groupThe JSContextGroup to retain.
A JSContextGroup that is the same as group.
JSGlobalContextCreate |
Creates a global JavaScript execution context.
JS_EXPORT JSGlobalContextRef JSGlobalContextCreate( JSClassRef globalObjectClass) AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER;
globalObjectClassThe class to use when creating the global object. Pass NULL to use the default object class.
A JSGlobalContext with a global object of class globalObjectClass.
JSGlobalContextCreate allocates a global object and populates it with all the built-in JavaScript objects, such as Object, Function, String, and Array.
In WebKit version 4.0 and later, the context is created in a unique context group. Therefore, scripts may execute in it concurrently with scripts executing in other contexts. However, you may not use values created in the context in other contexts.
JSGlobalContextCreateInGroup |
Creates a global JavaScript execution context in the context group provided.
JS_EXPORT JSGlobalContextRef JSGlobalContextCreateInGroup( JSContextGroupRef group, JSClassRef globalObjectClass) AVAILABLE_IN_WEBKIT_VERSION_4_0;
globalObjectClassThe class to use when creating the global object. Pass NULL to use the default object class.
groupThe context group to use. The created global context retains the group. Pass NULL to create a unique group for the context.
A JSGlobalContext with a global object of class globalObjectClass and a context group equal to group.
JSGlobalContextCreateInGroup allocates a global object and populates it with all the built-in JavaScript objects, such as Object, Function, String, and Array.
JSGlobalContextRelease |
Releases a global JavaScript execution context.
JS_EXPORT void JSGlobalContextRelease( JSGlobalContextRef ctx);
ctxThe JSGlobalContext to release.
JSGlobalContextRetain |
Retains a global JavaScript execution context.
JS_EXPORT JSGlobalContextRef JSGlobalContextRetain( JSGlobalContextRef ctx);
ctxThe JSGlobalContext to retain.
A JSGlobalContext that is the same as ctx.
Last Updated: 2009-08-12