Ultralight C API 1.3.0
|
Go to the source code of this file.
Functions | |
ios (10.0)) | |
JSType | JSValueGetType (JSContextRef ctx, JSValueRef value) |
Returns a JavaScript value's type. | |
bool | JSValueIsUndefined (JSContextRef ctx, JSValueRef value) |
Tests whether a JavaScript value's type is the undefined type. | |
bool | JSValueIsNull (JSContextRef ctx, JSValueRef value) |
Tests whether a JavaScript value's type is the null type. | |
bool | JSValueIsBoolean (JSContextRef ctx, JSValueRef value) |
Tests whether a JavaScript value's type is the boolean type. | |
bool | JSValueIsNumber (JSContextRef ctx, JSValueRef value) |
Tests whether a JavaScript value's type is the number type. | |
bool | JSValueIsString (JSContextRef ctx, JSValueRef value) |
Tests whether a JavaScript value's type is the string type. | |
bool | JSValueIsSymbol (JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.15) |
Tests whether a JavaScript value's type is the symbol type. | |
bool | ios (13.0)) |
bool | JSValueIsObject (JSContextRef ctx, JSValueRef value) |
Tests whether a JavaScript value's type is the object type. | |
bool | JSValueIsObjectOfClass (JSContextRef ctx, JSValueRef value, JSClassRef jsClass) |
Tests whether a JavaScript value is an object with a given class in its class chain. | |
bool | JSValueIsArray (JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.11) |
Tests whether a JavaScript value is an array. | |
bool | ios (9.0)) |
bool | JSValueIsDate (JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.11) |
Tests whether a JavaScript value is a date. | |
JSTypedArrayType | JSValueGetTypedArrayType (JSContextRef ctx, JSValueRef value, JSValueRef *exception) JSC_API_AVAILABLE(macos(10.12) |
Returns a JavaScript value's Typed Array type. | |
bool | JSValueIsEqual (JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef *exception) |
Tests whether two JavaScript values are equal, as compared by the JS == operator. | |
bool | JSValueIsStrictEqual (JSContextRef ctx, JSValueRef a, JSValueRef b) |
Tests whether two JavaScript values are strict equal, as compared by the JS === operator. | |
bool | JSValueIsInstanceOfConstructor (JSContextRef ctx, JSValueRef value, JSObjectRef constructor, JSValueRef *exception) |
Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator. | |
JSValueRef | JSValueMakeUndefined (JSContextRef ctx) |
Creates a JavaScript value of the undefined type. | |
JSValueRef | JSValueMakeNull (JSContextRef ctx) |
Creates a JavaScript value of the null type. | |
JSValueRef | JSValueMakeBoolean (JSContextRef ctx, bool boolean) |
Creates a JavaScript value of the boolean type. | |
JSValueRef | JSValueMakeNumber (JSContextRef ctx, double number) |
Creates a JavaScript value of the number type. | |
JSValueRef | JSValueMakeString (JSContextRef ctx, JSStringRef string) |
Creates a JavaScript value of the string type. | |
JSValueRef | JSValueMakeSymbol (JSContextRef ctx, JSStringRef description) JSC_API_AVAILABLE(macos(10.15) |
Creates a JavaScript value of the symbol type. | |
JSValueRef | JSValueMakeFromJSONString (JSContextRef ctx, JSStringRef string) JSC_API_AVAILABLE(macos(10.7) |
Creates a JavaScript value from a JSON formatted string. | |
JSValueRef | ios (7.0)) |
JSStringRef | JSValueCreateJSONString (JSContextRef ctx, JSValueRef value, unsigned indent, JSValueRef *exception) JSC_API_AVAILABLE(macos(10.7) |
Creates a JavaScript string containing the JSON serialized representation of a JS value. | |
bool | JSValueToBoolean (JSContextRef ctx, JSValueRef value) |
Converts a JavaScript value to boolean and returns the resulting boolean. | |
double | JSValueToNumber (JSContextRef ctx, JSValueRef value, JSValueRef *exception) |
Converts a JavaScript value to number and returns the resulting number. | |
JSStringRef | JSValueToStringCopy (JSContextRef ctx, JSValueRef value, JSValueRef *exception) |
Converts a JavaScript value to string and copies the result into a JavaScript string. | |
JSObjectRef | JSValueToObject (JSContextRef ctx, JSValueRef value, JSValueRef *exception) |
Converts a JavaScript value to object and returns the resulting object. | |
void | JSValueProtect (JSContextRef ctx, JSValueRef value) |
Protects a JavaScript value from garbage collection. | |
void | JSValueUnprotect (JSContextRef ctx, JSValueRef value) |
Unprotects a JavaScript value from garbage collection. | |
Enumerations | |
enum | JSType { kJSTypeUndefined , kJSTypeNull , kJSTypeBoolean , kJSTypeNumber , kJSTypeString , kJSTypeObject , JSC_API_AVAILABLE =(macos(10.15), ios(13.0)) } |
A constant identifying the type of a JSValue. More... | |
enum | JSTypedArrayType { kJSTypedArrayTypeInt8Array , kJSTypedArrayTypeInt16Array , kJSTypedArrayTypeInt32Array , kJSTypedArrayTypeUint8Array , kJSTypedArrayTypeUint8ClampedArray , kJSTypedArrayTypeUint16Array , kJSTypedArrayTypeUint32Array , kJSTypedArrayTypeFloat32Array , kJSTypedArrayTypeFloat64Array , kJSTypedArrayTypeArrayBuffer , kJSTypedArrayTypeNone } |
A constant identifying the Typed Array type of a JSObjectRef. More... | |
ios | ( | 10. | 0 | ) |
bool ios | ( | 13. | 0 | ) |
JSValueRef ios | ( | 7. | 0 | ) |
bool ios | ( | 9. | 0 | ) |
JSStringRef JSValueCreateJSONString | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
unsigned | indent, | ||
JSValueRef * | exception | ||
) |
Creates a JavaScript string containing the JSON serialized representation of a JS value.
JSType JSValueGetType | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Returns a JavaScript value's type.
JSTypedArrayType JSValueGetTypedArrayType | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
JSValueRef * | exception | ||
) |
Returns a JavaScript value's Typed Array type.
bool JSValueIsArray | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value is an array.
bool JSValueIsBoolean | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the boolean type.
bool JSValueIsDate | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value is a date.
bool JSValueIsEqual | ( | JSContextRef | ctx, |
JSValueRef | a, | ||
JSValueRef | b, | ||
JSValueRef * | exception | ||
) |
Tests whether two JavaScript values are equal, as compared by the JS == operator.
bool JSValueIsInstanceOfConstructor | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
JSObjectRef | constructor, | ||
JSValueRef * | exception | ||
) |
Tests whether a JavaScript value is an object constructed by a given constructor, as compared by the JS instanceof operator.
bool JSValueIsNull | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the null type.
bool JSValueIsNumber | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the number type.
bool JSValueIsObject | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the object type.
bool JSValueIsObjectOfClass | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
JSClassRef | jsClass | ||
) |
Tests whether a JavaScript value is an object with a given class in its class chain.
bool JSValueIsStrictEqual | ( | JSContextRef | ctx, |
JSValueRef | a, | ||
JSValueRef | b | ||
) |
Tests whether two JavaScript values are strict equal, as compared by the JS === operator.
bool JSValueIsString | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the string type.
bool JSValueIsSymbol | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the symbol type.
bool JSValueIsUndefined | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Tests whether a JavaScript value's type is the undefined type.
JSValueRef JSValueMakeBoolean | ( | JSContextRef | ctx, |
bool | boolean | ||
) |
Creates a JavaScript value of the boolean type.
JSValueRef JSValueMakeFromJSONString | ( | JSContextRef | ctx, |
JSStringRef | string | ||
) |
Creates a JavaScript value from a JSON formatted string.
JSValueRef JSValueMakeNull | ( | JSContextRef | ctx | ) |
Creates a JavaScript value of the null type.
JSValueRef JSValueMakeNumber | ( | JSContextRef | ctx, |
double | number | ||
) |
Creates a JavaScript value of the number type.
JSValueRef JSValueMakeString | ( | JSContextRef | ctx, |
JSStringRef | string | ||
) |
Creates a JavaScript value of the string type.
JSValueRef JSValueMakeSymbol | ( | JSContextRef | ctx, |
JSStringRef | description | ||
) |
Creates a JavaScript value of the symbol type.
JSValueRef JSValueMakeUndefined | ( | JSContextRef | ctx | ) |
Creates a JavaScript value of the undefined type.
void JSValueProtect | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Protects a JavaScript value from garbage collection.
bool JSValueToBoolean | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Converts a JavaScript value to boolean and returns the resulting boolean.
double JSValueToNumber | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
JSValueRef * | exception | ||
) |
Converts a JavaScript value to number and returns the resulting number.
JSObjectRef JSValueToObject | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
JSValueRef * | exception | ||
) |
Converts a JavaScript value to object and returns the resulting object.
JSStringRef JSValueToStringCopy | ( | JSContextRef | ctx, |
JSValueRef | value, | ||
JSValueRef * | exception | ||
) |
Converts a JavaScript value to string and copies the result into a JavaScript string.
void JSValueUnprotect | ( | JSContextRef | ctx, |
JSValueRef | value | ||
) |
Unprotects a JavaScript value from garbage collection.
enum JSType |
A constant identifying the type of a JSValue.
kJSTypeUndefined
The unique undefined value. kJSTypeNull
The unique null value. kJSTypeBoolean
A primitive boolean value, one of true or false. kJSTypeNumber
A primitive number value. kJSTypeString
A primitive string value. kJSTypeObject
An object value (meaning that this JSValueRef is a JSObjectRef). kJSTypeSymbol
A primitive symbol value. Enumerator | |
---|---|
kJSTypeUndefined | |
kJSTypeNull | |
kJSTypeBoolean | |
kJSTypeNumber | |
kJSTypeString | |
kJSTypeObject | |
JSC_API_AVAILABLE |
enum JSTypedArrayType |
A constant identifying the Typed Array type of a JSObjectRef.
kJSTypedArrayTypeInt8Array
Int8Array kJSTypedArrayTypeInt16Array
Int16Array kJSTypedArrayTypeInt32Array
Int32Array kJSTypedArrayTypeUint8Array
Uint8Array kJSTypedArrayTypeUint8ClampedArray
Uint8ClampedArray kJSTypedArrayTypeUint16Array
Uint16Array kJSTypedArrayTypeUint32Array
Uint32Array kJSTypedArrayTypeFloat32Array
Float32Array kJSTypedArrayTypeFloat64Array
Float64Array kJSTypedArrayTypeArrayBuffer
ArrayBuffer kJSTypedArrayTypeNone
Not a Typed Array