Crate javascriptcore_sys
source ·Expand description
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§
- Contains properties and callbacks that define a type of object.
- A statically declared function property.
- A statically declared value property.
Enums§
- A constant identifying the type of a
JSValueRef. - A constant identifying the Typed Array type of a
JSObjectRef.
Constants§
- Specifies that a class should not automatically generate a shared prototype for its instance objects. Use
kJSClassAttributeNoAutomaticPrototypein combination withJSObjectSetPrototypeto manage prototypes manually. - Specifies that a class has no special attributes.
- Specifies that the delete operation should fail on a property.
- Specifies that a property should not be enumerated by
JSPropertyEnumeratorsand JavaScriptfor...inloops. - Specifies that a property has no special attributes.
- Specifies that a property is read-only.
Functions§
- Checks for syntax errors in a string of JavaScript.
- Creates a JavaScript class suitable for use with
JSObjectMake. - Releases a JavaScript class.
- Retains a JavaScript class.
- Gets the global context of a JavaScript execution context.
- Gets the global object of a JavaScript execution context.
- Gets the context group to which a JavaScript execution context belongs.
- Creates a JavaScript context group.
- Releases a JavaScript context group.
- Retains a JavaScript context group.
- Evaluates a string of JavaScript.
- Performs a JavaScript garbage collection.
- Gets a copy of the name of a context.
- Creates a global JavaScript execution context.
- Creates a global JavaScript execution context in the context group provided.
- Releases a global JavaScript execution context.
- Retains a global JavaScript execution context.
- Sets the remote debugging name for a context.
- Calls an object as a constructor.
- Calls an object as a function.
- Gets the names of an object’s enumerable properties.
- Deletes a property from an object.
- Deletes a property from an object using a
JSValueRefas the property key. - Returns the number of bytes in a JavaScript data object.
- Returns a pointer to the data buffer that serves as the backing store for a JavaScript Typed Array object.
- Gets an object’s private data.
- Gets a property from an object.
- Gets a property from an object by numeric index.
- Gets a property from an object using a
JSValueRefas the property key. - Gets an object’s prototype.
- Returns the JavaScript Array Buffer object that is used as the backing of a JavaScript Typed Array object.
- Returns the byte length of a JavaScript Typed Array object.
- Returns the byte offset of a JavaScript Typed Array object.
- Returns a temporary pointer to the backing store of a JavaScript Typed Array object.
- Returns the length of a JavaScript Typed Array object.
- Tests whether an object has a given property.
- Tests whether an object has a given property using a
JSValueRefas the property key. - Tests whether an object can be called as a constructor.
- Tests whether an object can be called as a function.
- Creates a JavaScript object.
- Creates a JavaScript Array object.
- Creates a JavaScript Array Buffer object from an existing pointer.
- Convenience method for creating a JavaScript constructor.
- Creates a JavaScript
Dateobject, as if by invoking the built-inDateconstructor. - Creates a JavaScript promise object by invoking the provided executor.
- Creates a JavaScript
Errorobject, as if by invoking the built-inErrorconstructor. - Creates a function with a given script as its body.
- Convenience method for creating a JavaScript function with a given callback as its implementation.
- Creates a JavaScript
RegExpobject, as if by invoking the built-inRegExpconstructor. - Creates a JavaScript Typed Array object with the given number of elements.
- Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object.
- Creates a JavaScript Typed Array object from an existing JavaScript Array Buffer object with the given offset and length.
- Creates a JavaScript Typed Array object from an existing pointer.
- Sets a pointer to private data on an object.
- Sets a property on an object.
- Sets a property on an object by numeric index.
- Sets a property on an object using a
JSValueRefas the property key. - Sets an object’s prototype.
- Adds a property name to a JavaScript property name accumulator.
- Gets a count of the number of items in a JavaScript property name array.
- Gets a property name at a given index in a JavaScript property name array.
- Releases a JavaScript property name array.
- Retains a JavaScript property name array.
- Creates a JavaScript string from a buffer of Unicode characters.
- Creates a JavaScript string from a null-terminated UTF8 string.
- Returns a pointer to the Unicode character buffer that serves as the backing store for a JavaScript string.
- Returns the number of Unicode characters in a JavaScript string.
- Returns the maximum number of bytes a JavaScript string will take up if converted into a null-terminated UTF8 string.
- Converts a JavaScript string into a null-terminated UTF8 string, and copies the result into an external byte buffer.
- Tests whether two JavaScript strings match.
- Tests whether a JavaScript string matches a null-terminated UTF8 string.
- Releases a JavaScript string.
- Retains a JavaScript string.
- Creates a JavaScript string containing the JSON serialized representation of a JS value.
- Returns a JavaScript value’s type.
- Returns a JavaScript value’s Typed Array type.
- Tests whether a JavaScript value is an
array. - Tests whether a JavaScript value’s type is the
booleantype. - Tests whether a JavaScript value is a
date. - Tests whether two JavaScript values are equal, as compared by the JS
==operator. - Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS
instanceofoperator. - Tests whether a JavaScript value’s type is the
nulltype. - Tests whether a JavaScript value’s type is the
numbertype. - Tests whether a JavaScript value’s type is the
objecttype. - Tests whether a JavaScript value is an
objectwith a given class in its class chain. - Tests whether two JavaScript values are strict equal, as compared by the JS
===operator. - Tests whether a JavaScript value’s type is the
stringtype. - Tests whether a JavaScript value’s type is the
symboltype. - Tests whether a JavaScript value’s type is the
undefinedtype. - Creates a JavaScript value of the
booleantype. - Creates a JavaScript value from a JSON formatted string.
- Creates a JavaScript value of the
nulltype. - Creates a JavaScript value of the
numbertype. - Creates a JavaScript value of the string type.
- Creates a JavaScript value of the symbol type.
- Creates a JavaScript value of the
undefinedtype. - Protects a JavaScript value from garbage collection.
- Converts a JavaScript value to boolean and returns the resulting boolean.
- Converts a JavaScript value to number and returns the resulting number.
- Converts a JavaScript value to object and returns the resulting object.
- Converts a JavaScript value to string and copies the result into a JavaScript string.
- Unprotects a JavaScript value from garbage collection.
Type Aliases§
- A UTF-16 code unit.
- A set of
JSClassAttributes. - A JavaScript class. Used with
JSObjectMaketo construct objects with custom behavior. - A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
- A JavaScript execution context. Holds the global object and other execution state.
- A global JavaScript execution context. A
JSGlobalContextRefis aJSContextRef. - The callback invoked when an object is used as a constructor in a
newexpression. - The callback invoked when an object is called as a function.
- The callback invoked when converting an object to a particular JavaScript type.
- The callback invoked when deleting a property.
- The callback invoked when an object is finalized (prepared for garbage collection). An object may be finalized on any thread.
- The callback invoked when getting a property’s value.
- The callback invoked when collecting the names of an object’s properties.
- The callback invoked when an object is used as the target of an
instanceofexpression. - The callback invoked when determining whether an object has a property.
- The callback invoked when an object is first created.
- A JavaScript object. A
JSObjectRefis aJSValueRef. - The callback invoked when setting a property’s value.
- A set of
JSPropertyAttributes. - An ordered set used to collect the names of a JavaScript object’s properties.
- An array of JavaScript property names.
- A UTF16 character buffer. The fundamental string representation in JavaScript.
- 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.
- A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them.