javascriptcore/flutter_jscore library

Classes

Bytes
A pointer to the byte buffer to be used as the backing store of the Typed Array object.
JSClass
A JavaScript class. Used with JSObjectMake to construct objects with custom behavior.
JSClassDefinition
struct JSStaticFunction This structure contains properties and callbacks that define a type of object. All fields other than the version field are optional. Any pointer may be NULL. The staticValues and staticFunctions arrays are the simplest and most efficient means for vending custom properties. Statically declared properties autmatically service requests like getProperty, setProperty, and getPropertyNames. Property access callbacks are required only to implement unusual properties, like array indexes, whose names are not known at compile-time.
JSContext
A JavaScript execution context. Holds the global object and other execution state.
JSContextGroup
JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
JSObject
A JavaScript object. A JSObject is a JSValue.
JSObjectPointer
JSObjectRef pointer
JSPropertyNameAccumulator
An ordered set used to collect the names of a JavaScript object's properties.
JSPropertyNameArray
An array of JavaScript property names.
JSStaticFunction
struct JSStaticFunction This structure describes a statically declared function property.
JSStaticValue
struct JSStaticValue This structure describes a statically declared value property.
JSString
A UTF16 character buffer. The fundamental string representation in JavaScript.
JSStringPointer
JSStringRef pointer
JSValue
A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them.
JSValuePointer
JSValueRef pointer

Enums

JSClassAttributes
enum JSClassAttributes A set of JSClassAttributes. Combine multiple attributes by logically ORing them together.
JSPropertyAttributes
enum JSPropertyAttributes A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together.
JSType
enum JSType A constant identifying the type of a JSValue.
JSTypedArrayType
enum JSTypedArrayType A constant identifying the Typed Array type of a JSObjectRef.

Functions

cEnumToJSClassAttributes(int typeCode) JSClassAttributes
C enum to enum JSClassAttributes
cEnumToJSPropertyAttributes(int typeCode) JSPropertyAttributes
C enum to enum JSPropertyAttributes
jSClassAttributesToCEnum(JSClassAttributes type) int
enum JSClassAttributes to C enum
jSPropertyAttributesToCEnum(JSPropertyAttributes type) int
enum JSPropertyAttributes to C enum

Typedefs

JSObjectCallAsConstructorCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> constructor, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
typedef JSObjectCallAsConstructorCallback The callback invoked when an object is used as a constructor in a 'new' expression. ctx The execution context to use. constructor A JSObject that is the constructor being called. argumentCount An integer count of the number of arguments in arguments. arguments A JSValue array of the arguments passed to the function. exception A pointer to a JSValueRef in which to return an exception, if any. @result A JSObject that is the constructor's return value. If you named your function CallAsConstructor, you would declare it like this:
JSObjectCallAsFunctionCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> function, Pointer<NativeType> thisObject, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
typedef JSObjectCallAsFunctionCallback The callback invoked when an object is called as a function. ctx The execution context to use. function A JSObject that is the function being called. thisObject A JSObject that is the 'this' variable in the function's scope. argumentCount An integer count of the number of arguments in arguments. arguments A JSValue array of the arguments passed to the function. exception A pointer to a JSValueRef in which to return an exception, if any. @result A JSValue that is the function's return value. If you named your function CallAsFunction, you would declare it like this:
JSObjectDeletePropertyCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<Pointer<NativeType>> exception)
typedef JSObjectDeletePropertyCallback The callback invoked when deleting a property. ctx The execution context to use. object The JSObject in which to delete the property. propertyName A JSString containing the name of the property to delete. exception A pointer to a JSValueRef in which to return an exception, if any. @result true if propertyName was successfully deleted, otherwise false. If you named your function DeleteProperty, you would declare it like this:
JSObjectFinalizeCallbackDart = void Function(Pointer<NativeType> object)
typedef JSObjectFinalizeCallback The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread. object The JSObject being finalized. If you named your function Finalize, you would declare it like this:
JSObjectGetPropertyCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<Pointer<NativeType>> exception)
typedef JSObjectGetPropertyCallback The callback invoked when getting a property's value. ctx The execution context to use. object The JSObject to search for the property. propertyName A JSString containing the name of the property to get. exception A pointer to a JSValueRef in which to return an exception, if any. @result The property's value if object has the property, otherwise NULL. If you named your function GetProperty, you would declare it like this:
JSObjectGetPropertyNamesCallbackDart = void Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyNames)
typedef JSObjectGetPropertyNamesCallback The callback invoked when collecting the names of an object's properties. ctx The execution context to use. object The JSObject whose property names are being collected. propertyNames A JavaScript property name accumulator in which to accumulate the names of object's properties. If you named your function GetPropertyNames, you would declare it like this:
JSObjectHasInstanceCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> constructor, Pointer<NativeType> possibleInstance, Pointer<Pointer<NativeType>> exception)
typedef JSObjectHasInstanceCallback hasInstance The callback invoked when an object is used as the target of an 'instanceof' expression. ctx The execution context to use. constructor The JSObject that is the target of the 'instanceof' expression. possibleInstance The JSValue being tested to determine if it is an instance of constructor. exception A pointer to a JSValueRef in which to return an exception, if any. @result true if possibleInstance is an instance of constructor, otherwise false. If you named your function HasInstance, you would declare it like this:
JSObjectHasPropertyCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName)
typedef JSObjectHasPropertyCallback The callback invoked when determining whether an object has a property. ctx The execution context to use. object The JSObject to search for the property. propertyName A JSString containing the name of the property look up. @result true if object has the property, otherwise false. If you named your function HasProperty, you would declare it like this:
JSObjectInitializeCallbackDart = void Function(Pointer<NativeType> ctx, Pointer<NativeType> object)
typedef JSObjectInitializeCallback The callback invoked when an object is first created. ctx The execution context to use. object The JSObject being created. If you named your function Initialize, you would declare it like this:
JSObjectSetPropertyCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<NativeType> value, Pointer<Pointer<NativeType>> exception)
typedef JSObjectSetPropertyCallback The callback invoked when setting a property's value. ctx The execution context to use. object The JSObject on which to set the property's value. propertyName A JSString containing the name of the property to set. value A JSValue to use as the property's value. exception A pointer to a JSValueRef in which to return an exception, if any. @result true if the property was set, otherwise false. If you named your function SetProperty, you would declare it like this: