Crate javascriptcore_sys [−] [src]
This crate provides raw bindings for the JavaScriptCore public API. It is a pretty direct mapping of the underlying C API provided by JavaScriptCore.
Structs
| JSClassDefinition |
Contains properties and callbacks that define a type of object. |
| JSStaticFunction |
A statically declared function property. |
| JSStaticValue |
A statically declared value property. |
Enums
| JSType |
A constant identifying the type of a |
| JSTypedArrayType |
A constant identifying the Typed Array type of a |
Functions
| JSCheckScriptSyntax⚠ |
Checks for syntax errors in a string of JavaScript. |
| JSClassCreate⚠ |
Creates a JavaScript class suitable for use with |
| JSClassRelease⚠ |
Releases a JavaScript class. |
| JSClassRetain⚠ |
Retains a JavaScript class. |
| JSContextGetGlobalContext⚠ |
Gets the global context of a JavaScript execution context. |
| JSContextGetGlobalObject⚠ |
Gets the global object of a JavaScript execution context. |
| JSContextGetGroup⚠ |
Gets the context group to which a JavaScript execution context belongs. |
| JSContextGroupCreate⚠ |
Creates a JavaScript context group. |
| JSContextGroupRelease⚠ |
Releases a JavaScript context group. |
| JSContextGroupRetain⚠ |
Retains a JavaScript context group. |
| JSEvaluateScript⚠ |
Evaluates a string of JavaScript. |
| JSGarbageCollect⚠ |
Performs a JavaScript garbage collection. |
| JSGlobalContextCopyName⚠ |
Gets a copy of the name of a context. |
| JSGlobalContextCreate⚠ |
Creates a global JavaScript execution context. |
| JSGlobalContextCreateInGroup⚠ |
Creates a global JavaScript execution context in the context group provided. |
| JSGlobalContextRelease⚠ |
Releases a global JavaScript execution context. |
| JSGlobalContextRetain⚠ |
Retains a global JavaScript execution context. |
| JSGlobalContextSetName⚠ |
Sets the remote debugging name for a context. |
| JSObjectCallAsConstructor⚠ |
Calls an object as a constructor. |
| JSObjectCallAsFunction⚠ |
Calls an object as a function. |
| JSObjectCopyPropertyNames⚠ |
Gets the names of an object's enumerable properties. |
| JSObjectDeleteProperty⚠ |
Deletes a property from an object. |
| JSObjectGetArrayBufferByteLength⚠ |
Returns the number of bytes in a JavaScript data object. |
| JSObjectGetArrayBufferBytesPtr⚠ |
Returns a pointer to the data buffer that serves as the backing store for a JavaScript Typed Array object. |
| JSObjectGetPrivate⚠ |
Gets an object's private data. |
| JSObjectGetProperty⚠ |
Gets a property from an object. |
| JSObjectGetPropertyAtIndex⚠ |
Gets a property from an object by numeric index. |
| JSObjectGetPrototype⚠ |
Gets an object's prototype. |
| JSObjectGetTypedArrayBuffer⚠ |
Returns the JavaScript Array Buffer object that is used as the backing of a JavaScript Typed Array object. |
| JSObjectGetTypedArrayByteLength⚠ |
Returns the byte length of a JavaScript Typed Array object. |
| JSObjectGetTypedArrayByteOffset⚠ |
Returns the byte offset of a JavaScript Typed Array object. |
| JSObjectGetTypedArrayBytesPtr⚠ |
Returns a temporary pointer to the backing store of a JavaScript Typed Array object. |
| JSObjectGetTypedArrayLength⚠ |
Returns the length of a JavaScript Typed Array object. |
| JSObjectHasProperty⚠ |
Tests whether an object has a given property. |
| JSObjectIsConstructor⚠ |
Tests whether an object can be called as a constructor. |
| JSObjectIsFunction⚠ |
Tests whether an object can be called as a function. |
| JSObjectMake⚠ |
Creates a JavaScript object. |
| JSObjectMakeArray⚠ |
Creates a JavaScript Array object. |
| JSObjectMakeArrayBufferWithBytesNoCopy⚠ |
Creates a JavaScript Array Buffer object from an existing pointer. |
| JSObjectMakeConstructor⚠ |
Convenience method for creating a JavaScript constructor. |
| JSObjectMakeDate⚠ |
Creates a JavaScript |
| JSObjectMakeError⚠ |
Creates a JavaScript |
| JSObjectMakeFunction⚠ |
Creates a function with a given script as its body. |
| JSObjectMakeFunctionWithCallback⚠ |
Convenience method for creating a JavaScript function with a given callback as its implementation. |
| JSObjectMakeRegExp⚠ |
Creates a JavaScript |
| JSObjectMakeTypedArray⚠ |
Creates a JavaScript Typed Array object with the given number of elements. |
| JSObjectMakeTypedArrayWithArrayBuffer⚠ |
Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object. |
| JSObjectMakeTypedArrayWithArrayBufferAndOffset⚠ |
Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length. |
| JSObjectMakeTypedArrayWithBytesNoCopy⚠ |
Creates a JavaScript Typed Array object from an existing pointer. |
| JSObjectSetPrivate⚠ |
Sets a pointer to private data on an object. |
| JSObjectSetProperty⚠ |
Sets a property on an object. |
| JSObjectSetPropertyAtIndex⚠ |
Sets a property on an object by numeric index. |
| JSObjectSetPrototype⚠ |
Sets an object's prototype. |
| JSPropertyNameAccumulatorAddName⚠ |
Adds a property name to a JavaScript property name accumulator. |
| JSPropertyNameArrayGetCount⚠ |
Gets a count of the number of items in a JavaScript property name array. |
| JSPropertyNameArrayGetNameAtIndex⚠ |
Gets a property name at a given index in a JavaScript property name array. |
| JSPropertyNameArrayRelease⚠ |
Releases a JavaScript property name array. |
| JSPropertyNameArrayRetain⚠ |
Retains a JavaScript property name array. |
| JSStringCreateWithCharacters⚠ |
Creates a JavaScript string from a buffer of Unicode characters. |
| JSStringCreateWithUTF8CString⚠ |
Creates a JavaScript string from a null-terminated UTF8 string. |
| JSStringGetCharactersPtr⚠ |
Returns a pointer to the Unicode character buffer that serves as the backing store for a JavaScript string. |
| JSStringGetLength⚠ |
Returns the number of Unicode characters in a JavaScript string. |
| JSStringGetMaximumUTF8CStringSize⚠ |
Returns the maximum number of bytes a JavaScript string will take up if converted into a null-terminated UTF8 string. |
| JSStringGetUTF8CString⚠ |
Converts a JavaScript string into a null-terminated UTF8 string, and copies the result into an external byte buffer. |
| JSStringIsEqual⚠ |
Tests whether two JavaScript strings match. |
| JSStringIsEqualToUTF8CString⚠ |
Tests whether a JavaScript string matches a null-terminated UTF8 string. |
| JSStringRelease⚠ |
Releases a JavaScript string. |
| JSStringRetain⚠ |
Retains a JavaScript string. |
| JSValueCreateJSONString⚠ |
Creates a JavaScript string containing the JSON serialized representation of a JS value. |
| JSValueGetType⚠ |
Returns a JavaScript value's type. |
| JSValueGetTypedArrayType⚠ |
Returns a JavaScript value's Typed Array type. |
| JSValueIsArray⚠ |
Tests whether a JavaScript value is an |
| JSValueIsBoolean⚠ |
Tests whether a JavaScript value's type is the |
| JSValueIsDate⚠ |
Tests whether a JavaScript value is a |
| JSValueIsEqual⚠ |
Tests whether two JavaScript values are equal, as compared by the JS |
| JSValueIsInstanceOfConstructor⚠ |
Tests whether a JavaScript value is an object constructed by a
given constructor, as compared by the JS |
| JSValueIsNull⚠ |
Tests whether a JavaScript value's type is the |
| JSValueIsNumber⚠ |
Tests whether a JavaScript value's type is the |
| JSValueIsObject⚠ |
Tests whether a JavaScript value's type is the |
| JSValueIsObjectOfClass⚠ |
Tests whether a JavaScript value is an |
| JSValueIsStrictEqual⚠ |
Tests whether two JavaScript values are strict equal, as compared
by the JS |
| JSValueIsString⚠ |
Tests whether a JavaScript value's type is the |
| JSValueIsUndefined⚠ |
Tests whether a JavaScript value's type is the |
| JSValueMakeBoolean⚠ |
Creates a JavaScript value of the |
| JSValueMakeFromJSONString⚠ |
Creates a JavaScript value from a JSON formatted string. |
| JSValueMakeNull⚠ |
Creates a JavaScript value of the |
| JSValueMakeNumber⚠ |
Creates a JavaScript value of the |
| JSValueMakeString⚠ |
Creates a JavaScript value of the string type. |
| JSValueMakeUndefined⚠ |
Creates a JavaScript value of the |
| JSValueProtect⚠ |
Protects a JavaScript value from garbage collection. |
| JSValueToBoolean⚠ |
Converts a JavaScript value to boolean and returns the resulting boolean. |
| JSValueToNumber⚠ |
Converts a JavaScript value to number and returns the resulting number. |
| JSValueToObject⚠ |
Converts a JavaScript value to object and returns the resulting object. |
| JSValueToStringCopy⚠ |
Converts a JavaScript value to string and copies the result into a JavaScript string. |
| JSValueUnprotect⚠ |
Unprotects a JavaScript value from garbage collection. |
Type Definitions
| JSChar |
A UTF-16 code unit. |
| JSClassAttributes |
A set of |
| JSClassRef |
A JavaScript class.
Used with |
| JSContextGroupRef |
A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects. |
| JSContextRef |
A JavaScript execution context. Holds the global object and other execution state. |
| JSGlobalContextRef |
A global JavaScript execution context.
A |
| JSObjectCallAsConstructorCallback |
The callback invoked when an object is used as a constructor in a |
| JSObjectCallAsFunctionCallback |
The callback invoked when an object is called as a function. |
| JSObjectConvertToTypeCallback |
The callback invoked when converting an object to a particular JavaScript type. |
| JSObjectDeletePropertyCallback |
The callback invoked when deleting a property. |
| JSObjectFinalizeCallback |
The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread. |
| JSObjectGetPropertyCallback |
The callback invoked when getting a property's value. |
| JSObjectGetPropertyNamesCallback |
The callback invoked when collecting the names of an object's properties. |
| JSObjectHasInstanceCallback |
The callback invoked when an object is used as the target
of an |
| JSObjectHasPropertyCallback |
The callback invoked when determining whether an object has a property. |
| JSObjectInitializeCallback |
The callback invoked when an object is first created. |
| JSObjectRef |
A JavaScript object. A |
| JSObjectSetPropertyCallback |
The callback invoked when setting a property's value. |
| JSPropertyAttributes |
A set of |
| JSPropertyNameAccumulatorRef |
An ordered set used to collect the names of a JavaScript object's properties. |
| JSPropertyNameArrayRef |
An array of JavaScript property names. |
| JSStringRef |
A UTF16 character buffer. The fundamental string representation in JavaScript. |
| 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. |
| JSValueRef |
A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them. |