binding/JSContextRef
library
Properties
-
JSContextGetGlobalContext
→ JSGlobalContextRef Function(JSContextRef ctx)
-
Gets the global context of a JavaScript execution context.
ctx
(JSContextRef) The JSContext whose global context you want to get.
@result
(JSGlobalContextRef) ctx's global context.
final
-
JSContextGetGlobalObject
→ JSObjectRef Function(JSContextRef ctx)
-
Gets the global object of a JavaScript execution context.
ctx
(JSContextRef) The JSContext whose global object you want to get.
@result
(JSObjectRef) ctx's global object.
final
-
JSContextGetGroup
→ JSContextGroupRef Function(JSContextRef ctx)
-
Gets the context group to which a JavaScript execution context belongs.
ctx
(JSContextRef) The JSContext whose group you want to get.
@result
(JSContextGroupRef) ctx's group.
final
-
JSContextGroupCreate
→ JSContextGroupRef Function()
-
Creates a JavaScript context group.
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.
final
-
JSContextGroupRelease
→ void Function(JSContextGroupRef group)
-
Releases a JavaScript context group.
group
(JSContextGroupRef) The JSContextGroup to release.
final
-
JSContextGroupReleaseAddress
→ Pointer<NativeFunction<Void Function(JSContextGroupRef)>>
-
final
-
JSContextGroupRetain
→ JSContextGroupRef Function(JSContextGroupRef group)
-
Retains a JavaScript context group.
group
(JSContextGroupRef) The JSContextGroup to retain.
@result
(JSContextGroupRef) A JSContextGroup that is the same as group.
final
-
JSGlobalContextCopyName
→ JSStringRef Function(JSGlobalContextRef ctx)
-
Gets a copy of the name of a context.
A JSGlobalContext's name is exposed for remote debugging to make it
easier to identify the context you would like to attach to.
ctx
(JSGlobalContextRef) The JSGlobalContext whose name you want to get.
@result
(JSStringRef) The name for ctx.
final
-
JSGlobalContextCreate
→ JSGlobalContextRef Function(JSClassRef globalObjectClass)
-
Creates a global JavaScript execution context.
JSGlobalContextCreate allocates a global object and populates it with all the
built-in JavaScript objects, such as Object, Function, String, and Array.
final
-
JSGlobalContextCreateInGroup
→ JSGlobalContextRef Function(JSContextGroupRef group, JSClassRef globalObjectClass)
-
Creates a global JavaScript execution context in the context group provided.
JSGlobalContextCreateInGroup allocates a global object and populates it with
all the built-in JavaScript objects, such as Object, Function, String, and Array.
group
(JSContextGroupRef) The context group to use. The created global context retains the group. Pass NULL to create a unique group for the context.
globalObjectClass
(JSClassRef) The class to use when creating the global object. Pass NULL to use the default object class.
@result
(JSGlobalContextRef) A JSGlobalContext with a global object of class globalObjectClass and a context group equal to group.
final
-
JSGlobalContextRelease
→ void Function(JSGlobalContextRef ctx)
-
Releases a global JavaScript execution context.
ctx
(JSGlobalContextRef) The JSGlobalContext to release.
final
-
JSGlobalContextReleaseAddress
→ Pointer<NativeFunction<Void Function(JSGlobalContextRef)>>
-
final
-
JSGlobalContextRetain
→ JSGlobalContextRef Function(JSGlobalContextRef ctx)
-
Retains a global JavaScript execution context.
ctx
(JSGlobalContextRef) The JSGlobalContext to retain.
@result
(JSGlobalContextRef) A JSGlobalContext that is the same as ctx.
final
-
JSGlobalContextSetInspectable
→ void Function(JSGlobalContextRef ctx, bool inspectable)
-
Sets the remote debugging name for a context.
ctx
The JSGlobalContextRef that you want to name.
inspectable
The remote debugging name to set on ctx.
final
-
JSGlobalContextSetName
→ void Function(JSGlobalContextRef ctx, JSStringRef name)
-
Sets the remote debugging name for a context.
ctx
(JSGlobalContextRef) The JSGlobalContext that you want to name.
name
(JSStringRef) The remote debugging name to set on ctx.
final