binding/js_object_ref library

Classes

JSClassAttributes
enum JSClassAttributes A set of JSClassAttributes. Combine multiple attributes by logically ORing them together.
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.
JSPropertyAttributes
enum JSPropertyAttributes A set of JSPropertyAttributes. Combine multiple attributes by logically ORing them together.
JSStaticFunction
struct JSStaticFunction This structure describes a statically declared function property.
JSStaticFunctionStruct
JSStaticValue
struct JSStaticValue This structure describes a statically declared value property.
JSStaticValueStruct

Properties

jSClassCreate Pointer<NativeType> Function(Pointer<JSClassDefinition> definition)
Creates a JavaScript class suitable for use with JSObjectMake. definition (JSClassDefinition*) A JSClassDefinition that defines the class. @result (JSClassRef) A JSClass with the given definition. Ownership follows the Create Rule.
final
jSClassRelease → void Function(Pointer<NativeType> jsClass)
Releases a JavaScript class. jsClass (JSClassRef) The JSClass to release.
final
jSClassRetain Pointer<NativeType> Function(Pointer<NativeType> jsClass)
Retains a JavaScript class. jsClass (JSClassRef) The JSClass to retain. @result (JSClassRef) A JSClass that is the same as jsClass.
final
jSObjectCallAsConstructor Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, int argumentCount, Pointer<NativeType> arguments, Pointer<Pointer<NativeType>> exception)
Calls an object as a constructor. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject to call as a constructor. argumentCount (size_t) An integer count of the number of arguments in arguments. arguments (JSValueRef[]) A JSValue array of arguments to pass to the constructor. Pass NULL if argumentCount is 0. 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 (JSObjectRef) The JSObject that results from calling object as a constructor, or NULL if an exception is thrown or object is not a constructor.
final
jSObjectCallAsFunction Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> thisObject, int argumentCount, Pointer<NativeType> arguments, Pointer<Pointer<NativeType>> exception)
Calls an object as a function. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject to call as a function. thisObject (JSObjectRef) The object to use as "this," or NULL to use the global object as "this." argumentCount (size_t) An integer count of the number of arguments in arguments. arguments (JSValueRef[]) A JSValue array of arguments to pass to the function. Pass NULL if argumentCount is 0. 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 calling object as a function, or NULL if an exception is thrown or object is not a function.
final
jSObjectCopyPropertyNames Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object)
Gets the names of an object's enumerable properties. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The object whose property names you want to get. @result (JSPropertyNameArrayRef) A JSPropertyNameArray containing the names object's enumerable properties. Ownership follows the Create Rule.
final
jSObjectDeleteProperty int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<Pointer<NativeType>> exception)
Deletes a property from an object. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to delete. propertyName (JSStringRef) A JSString containing the property's name. 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 (bool) true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
final
jSObjectDeletePropertyForKey int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyKey, Pointer<Pointer<NativeType>> exception)
Deletes a property from an object using a JSValueRef as the property key. This function is the same as performing "delete objectpropertyKey" from JavaScript. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to delete. propertyKey (JSValueRef) A JSValueRef containing the property key to use when looking up the property. 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 (bool) true if the delete operation succeeds, otherwise false (for example, if the property has the kJSPropertyAttributeDontDelete attribute set).
final
jSObjectGetPrivate Pointer<NativeType> Function(Pointer<NativeType> object)
Gets an object's private data. object (JSObjectRef) A JSObject whose private data you want to get. @result (void*) A void* that is the object's private data, if the object has private data, otherwise NULL.
final
jSObjectGetProperty Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<Pointer<NativeType>> exception)
Gets a property from an object. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to get. propertyName (JSStringRef) A JSString containing the property's name. 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 property's value if object has the property, otherwise the undefined value.
final
jSObjectGetPropertyAtIndex Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, int propertyIndex, Pointer<Pointer<NativeType>> exception)
Gets a property from an object by numeric index. Calling JSObjectGetPropertyAtIndex is equivalent to calling JSObjectGetProperty with a string containing propertyIndex, but JSObjectGetPropertyAtIndex provides optimized access to numeric properties. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to get. propertyIndex (unsigned) An integer value that is the property's name. 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 property's value if object has the property, otherwise the undefined value.
final
jSObjectGetPropertyForKey Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyKey, Pointer<Pointer<NativeType>> exception)
Gets a property from an object using a JSValueRef as the property key. This function is the same as performing "objectpropertyKey" from JavaScript. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to get. propertyKey (JSValueRef) A JSValueRef containing the property key to use when looking up the property. 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 property's value if object has the property key, otherwise the undefined value.
final
jSObjectGetPrototype Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object)
Gets an object's prototype. ctx (JSContextRef) The execution context to use. object (JSObjectRef) A JSObject whose prototype you want to get. @result (JSValueRef) A JSValue that is the object's prototype.
final
jSObjectHasProperty int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName)
Tests whether an object has a given property. ctx (JSContextRef) object (JSObjectRef) The JSObject to test. propertyName (JSStringRef) A JSString containing the property's name. @result (bool) true if the object has a property whose name matches propertyName, otherwise false.
final
jSObjectHasPropertyForKey int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyKey, Pointer<Pointer<NativeType>> exception)
Tests whether an object has a given property using a JSValueRef as the property key. This function is the same as performing "propertyKey in object" from JavaScript. ctx (JSContextRef) object (JSObjectRef) The JSObject to test. propertyKey (JSValueRef) A JSValueRef containing the property key to use when looking up the property. 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 (bool) true if the object has a property whose name matches propertyKey, otherwise false.
final
jSObjectIsConstructor int Function(Pointer<NativeType> ctx, Pointer<NativeType> object)
Tests whether an object can be called as a constructor. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject to test. @result (bool) true if the object can be called as a constructor, otherwise false.
final
jSObjectIsFunction int Function(Pointer<NativeType> ctx, Pointer<NativeType> object)
Tests whether an object can be called as a function. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject to test. @result (bool) true if the object can be called as a function, otherwise false.
final
jSObjectMake Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> jsClass, Pointer<NativeType> data)
Creates a JavaScript object. The default object class does not allocate storage for private data, so you must provide a non-NULL jsClass to JSObjectMake if you want your object to be able to store private data.
final
jSObjectMakeArray Pointer<NativeType> Function(Pointer<NativeType> ctx, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
Creates a JavaScript Array object. The behavior of this function does not exactly match the behavior of the built-in Array constructor. Specifically, if one argument is supplied, this function returns an array with one element. ctx (JSContextRef) The execution context to use. argumentCount (size_t) An integer count of the number of arguments in arguments. arguments (JSValueRef[]) A JSValue array of data to populate the Array with. Pass NULL if argumentCount is 0. 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 (JSObjectRef) A JSObject that is an Array.
final
jSObjectMakeConstructor Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> jsClass, Pointer<NativeFunction<JSObjectCallAsConstructorCallback>> callAsConstructor)
Convenience method for creating a JavaScript constructor. The default object constructor takes no arguments and constructs an object of class jsClass with no private data. ctx (JSContextRef) The execution context to use. jsClass (JSClassRef) A JSClass that is the class your constructor will assign to the objects its constructs. jsClass will be used to set the constructor's .prototype property, and to evaluate 'instanceof' expressions. Pass NULL to use the default object class. callAsConstructor (JSObjectCallAsConstructorCallback) A JSObjectCallAsConstructorCallback to invoke when your constructor is used in a 'new' expression. Pass NULL to use the default object constructor. @result (JSObjectRef) A JSObject that is a constructor. The object's prototype will be the default object prototype.
final
jSObjectMakeDate Pointer<NativeType> Function(Pointer<NativeType> ctx, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
Creates a JavaScript Date object, as if by invoking the built-in Date constructor. ctx (JSContextRef) The execution context to use. argumentCount (size_t) An integer count of the number of arguments in arguments. arguments (JSValueRef[]) A JSValue array of arguments to pass to the Date Constructor. Pass NULL if argumentCount is 0. 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 (JSObjectRef) A JSObject that is a Date.
final
jSObjectMakeDeferredPromise Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> resolve, Pointer<NativeType> reject, Pointer<Pointer<NativeType>> exception)
Creates a JavaScript promise object by invoking the provided executor. ctx (JSContextRef) The execution context to use. resolve (JSObjectRef*) A pointer to a JSObjectRef in which to store the resolve function for the new promise. Pass NULL if you do not care to store the resolve callback. reject (JSObjectRef*) A pointer to a JSObjectRef in which to store the reject function for the new promise. Pass NULL if you do not care to store the reject callback. 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 (JSObjectRef) A JSObject that is a promise or NULL if an exception occurred.
final
jSObjectMakeError Pointer<NativeType> Function(Pointer<NativeType> ctx, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
Creates a JavaScript Error object, as if by invoking the built-in Error constructor. ctx (JSContextRef) The execution context to use. argumentCount (size_t) An integer count of the number of arguments in arguments. arguments (JSValueRef[]) A JSValue array of arguments to pass to the Error Constructor. Pass NULL if argumentCount is 0. 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 (JSObjectRef) A JSObject that is a Error.
final
jSObjectMakeFunction Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> name, int parameterCount, Pointer<NativeType> parameterNames, Pointer<NativeType> body, Pointer<NativeType> sourceURL, int startingLineNumber, Pointer<Pointer<NativeType>> exception)
Creates a function with a given script as its body. Use this method when you want to execute a script repeatedly, to avoid the cost of re-parsing the script before each execution. ctx (JSContextRef) The execution context to use. name (JSStringRef) A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. parameterCount (unsigned) An integer count of the number of parameter names in parameterNames. parameterNames (JSStringRef[]) A JSString array containing the names of the function's parameters. Pass NULL if parameterCount is 0. body (JSStringRef) A JSString containing the script to use as the function's body. 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 (JSObjectRef) A JSObject that is a function, or NULL if either body or parameterNames contains a syntax error. The object's prototype will be the default function prototype.
final
jSObjectMakeFunctionWithCallback Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> name, Pointer<NativeFunction<JSObjectCallAsFunctionCallback>> callAsFunction)
Convenience method for creating a JavaScript function with a given callback as its implementation. ctx (JSContextRef) The execution context to use. name (JSStringRef) A JSString containing the function's name. This will be used when converting the function to string. Pass NULL to create an anonymous function. callAsFunction (JSObjectCallAsFunctionCallback) The JSObjectCallAsFunctionCallback to invoke when the function is called. @result (JSObjectRef) A JSObject that is a function. The object's prototype will be the default function prototype.
final
jSObjectMakeRegExp Pointer<NativeType> Function(Pointer<NativeType> ctx, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
Creates a JavaScript RegExp object, as if by invoking the built-in RegExp constructor. ctx (JSContextRef) The execution context to use. argumentCount (size_t) An integer count of the number of arguments in arguments. arguments (JSValueRef[]) A JSValue array of arguments to pass to the RegExp Constructor. Pass NULL if argumentCount is 0. 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 (JSObjectRef) A JSObject that is a RegExp.
final
jSObjectSetPrivate int Function(Pointer<NativeType> object, Pointer<NativeType> data)
Sets a pointer to private data on an object. The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data. object (JSObjectRef) The JSObject whose private data you want to set. data (void*) A void* to set as the object's private data. @result (bool) true if object can store private data, otherwise false.
final
jSObjectSetProperty → void Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<NativeType> value, int attributes, Pointer<Pointer<NativeType>> exception)
Sets a property on an object. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to set. propertyName (JSStringRef) A JSString containing the property's name. value (JSValueRef) A JSValueRef to use as the property's value. attributes (JSPropertyAttributes) A logically ORed set of JSPropertyAttributes to give to the property. 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.
final
jSObjectSetPropertyAtIndex → void Function(Pointer<NativeType> ctx, Pointer<NativeType> object, int propertyIndex, Pointer<NativeType> value, Pointer<Pointer<NativeType>> exception)
Sets a property on an object by numeric index. Calling JSObjectSetPropertyAtIndex is equivalent to calling JSObjectSetProperty with a string containing propertyIndex, but JSObjectSetPropertyAtIndex provides optimized access to numeric properties. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to set. propertyIndex (unsigned) The property's name as a number. value (JSValueRef) A JSValue to use as the property's value. 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.
final
jSObjectSetPropertyForKey → void Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyKey, Pointer<NativeType> value, int attributes, Pointer<Pointer<NativeType>> exception)
Sets a property on an object using a JSValueRef as the property key. This function is the same as performing "objectpropertyKey = value" from JavaScript. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose property you want to set. propertyKey (JSValueRef) A JSValueRef containing the property key to use when looking up the property. value (JSValueRef) A JSValueRef to use as the property's value. attributes (JSPropertyAttributes) A logically ORed set of JSPropertyAttributes to give to the property. 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.
final
jSObjectSetPrototype → void Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> value)
Sets an object's prototype. ctx (JSContextRef) The execution context to use. object (JSObjectRef) The JSObject whose prototype you want to set. value (JSValueRef) A JSValue to set as the object's prototype.
final
jSPropertyNameAccumulatorAddName → void Function(Pointer<NativeType> accumulator, Pointer<NativeType> propertyName)
Adds a property name to a JavaScript property name accumulator. accumulator (JSPropertyNameAccumulatorRef) The accumulator object to which to add the property name. propertyName (JSStringRef) The property name to add.
final
jSPropertyNameArrayGetCount int Function(Pointer<NativeType> array)
Gets a count of the number of items in a JavaScript property name array. array (JSPropertyNameArrayRef) The array from which to retrieve the count. @result (size_t) An integer count of the number of names in array.
final
jSPropertyNameArrayGetNameAtIndex Pointer<NativeType> Function(Pointer<NativeType> array, int index)
Gets a property name at a given index in a JavaScript property name array. array (JSPropertyNameArrayRef) The array from which to retrieve the property name. index (size_t) The index of the property name to retrieve. @result (JSStringRef) A JSStringRef containing the property name.
final
jSPropertyNameArrayRelease → void Function(Pointer<NativeType> array)
Releases a JavaScript property name array. array (JSPropertyNameArrayRef) The JSPropetyNameArray to release.
final
jSPropertyNameArrayRetain Pointer<NativeType> Function(Pointer<NativeType> array)
Retains a JavaScript property name array. array (JSPropertyNameArrayRef) The JSPropertyNameArray to retain. @result (JSPropertyNameArrayRef) A JSPropertyNameArray that is the same as array.
final

Typedefs

JSObjectCallAsConstructorCallback = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> constructor, Uint32 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:
JSObjectCallAsConstructorCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> constructor, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
JSObjectCallAsFunctionCallback = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> function, Pointer<NativeType> thisObject, Uint32 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:
JSObjectCallAsFunctionCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> function, Pointer<NativeType> thisObject, int argumentCount, Pointer<Pointer<NativeType>> arguments, Pointer<Pointer<NativeType>> exception)
JSObjectConvertToTypeCallback = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Int8 type, Pointer<Pointer<NativeType>> exception)
typedef JSObjectConvertToTypeCallback The callback invoked when converting an object to a particular JavaScript type. ctx The execution context to use. object The JSObject to convert. type A JSType specifying the JavaScript type to convert to. exception A pointer to a JSValueRef in which to return an exception, if any. @result The objects's converted value, or NULL if the object was not converted. If you named your function ConvertToType, you would declare it like this:
JSObjectConvertToTypeCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, int type, Pointer<Pointer<NativeType>> exception)
JSObjectDeletePropertyCallback = Int8 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:
JSObjectDeletePropertyCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<Pointer<NativeType>> exception)
JSObjectFinalizeCallback = 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:
JSObjectFinalizeCallbackDart = void Function(Pointer<NativeType> object)
JSObjectGetPropertyCallback = 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:
JSObjectGetPropertyCallbackDart = Pointer<NativeType> Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<Pointer<NativeType>> exception)
JSObjectGetPropertyNamesCallback = 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:
JSObjectGetPropertyNamesCallbackDart = void Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyNames)
JSObjectHasInstanceCallback = Int8 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:
JSObjectHasInstanceCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> constructor, Pointer<NativeType> possibleInstance, Pointer<Pointer<NativeType>> exception)
JSObjectHasPropertyCallback = Int8 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:
JSObjectHasPropertyCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName)
JSObjectInitializeCallback = 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:
JSObjectInitializeCallbackDart = void Function(Pointer<NativeType> ctx, Pointer<NativeType> object)
JSObjectSetPropertyCallback = Int8 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:
JSObjectSetPropertyCallbackDart = int Function(Pointer<NativeType> ctx, Pointer<NativeType> object, Pointer<NativeType> propertyName, Pointer<NativeType> value, Pointer<Pointer<NativeType>> exception)