jSGlobalContextCreate top-level property

Pointer<NativeType> Function(Pointer<NativeType> globalObjectClass) jSGlobalContextCreate
final

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.

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. 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.

Implementation

final Pointer Function(Pointer globalObjectClass) jSGlobalContextCreate = jscLib
    .lookup<NativeFunction<Pointer Function(Pointer)>>('JSGlobalContextCreate')
    .asFunction();