binding/js_base library

Properties

jSCheckScriptSyntax Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> script, Pointer<NativeType> sourceURL, int startingLineNumber, Pointer<Pointer<NativeType>> exception)
Checks for syntax errors in a string of JavaScript. ctx (JSContextRef) The execution context to use. script (JSStringRef) A JSString containing the script to check for syntax errors. sourceURL (JSStringRef) A JSString containing a URL for the script's source file. This is only used when reporting exceptions. Pass NULL if you do not care to include source file information in exceptions. startingLineNumber (int) An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1. exception (JSValueRef*) A pointer to a JSValueRef in which to store a syntax error exception, if any. Pass NULL if you do not care to store a syntax error exception. @result (bool) true if the script is syntactically correct, otherwise false.
final
jSEvaluateScript Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> script, Pointer<NativeType> thisObject, Pointer<NativeType> sourceURL, int startingLineNumber, Pointer<Pointer<NativeType>> exception)
Evaluates a string of JavaScript. ctx (JSContextRef) The execution context to use. script (JSStringRef) A JSString containing the script to evaluate. thisObject (JSObjectRef) The object to use as "this," or NULL to use the global object as "this." sourceURL (JSStringRef) A JSString containing a URL for the script's source file. This is used by debuggers and when reporting exceptions. Pass NULL if you do not care to include source file information. startingLineNumber (int) An integer value specifying the script's starting line number in the file located at sourceURL. This is only used when reporting exceptions. The value is one-based, so the first line is line 1 and invalid values are clamped to 1. exception (JSValueRef*) A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception. @result (JSValueRef) The JSValue that results from evaluating script, or NULL if an exception is thrown.
final
jSGarbageCollect → void Function(Pointer<NativeType> ctx)
Performs a JavaScript garbage collection. JavaScript values that are on the machine stack, in a register, protected by JSValueProtect, set as the global object of an execution context, or reachable from any such value will not be collected.
final

Typedefs

JSTypedArrayBytesDeallocator = Void Function(Pointer<NativeType> bytes, Pointer<NativeType> deallocatorContext)
typedef JSTypedArrayBytesDeallocator A function used to deallocate bytes passed to a Typed Array constructor. The function should take two arguments. The first is a pointer to the bytes that were originally passed to the Typed Array constructor. The second is a pointer to additional information desired at the time the bytes are to be freed. typedef void (JSTypedArrayBytesDeallocator)(void bytes, void* deallocatorContext);
JSTypedArrayBytesDeallocatorDart = void Function(Pointer<NativeType> bytes, Pointer<NativeType> deallocatorContext)