struct OpaqueJSClass * JSClassRef
Definition JSBase.h:52
struct OpaqueJSString * JSStringRef
Definition JSBase.h:49
struct OpaqueJSValue * JSObjectRef
Definition JSBase.h:69
const struct OpaqueJSValue * JSValueRef
Definition JSBase.h:66
#define JS_EXPORT
Definition JSBase.h:93
const struct OpaqueJSContext * JSContextRef
Definition JSBase.h:43
JSValueRef JSValueMakeFromJSONString(JSContextRef ctx, JSStringRef string) JSC_API_AVAILABLE(macos(10.7)
Creates a JavaScript value from a JSON formatted string.
enum JSTypedArrayType ios
JSTypedArrayType JSValueGetTypedArrayType(JSContextRef ctx, JSValueRef value, JSValueRef *exception) JSC_API_AVAILABLE(macos(10.12)
Returns a JavaScript value's Typed Array type.
bool JSValueIsNumber(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the number type.
bool JSValueIsFunctionObject(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value is an actual function object.
JSValueRef JSValueMakeNull(JSContextRef ctx)
Creates a JavaScript value of the null type.
JSValueRef JSValueMakeSymbol(JSContextRef ctx, JSStringRef description) JSC_API_AVAILABLE(macos(10.15)
Creates a JavaScript value of the symbol type.
bool JSValueGetErrorDetails(JSContextRef ctx, JSValueRef value, JSTypedErrorType *outType, JSStringRef *outMessage, JSStringRef *outSourceURL, unsigned *outLine, unsigned *outColumn, JSStringRef *outStack)
Extracts the type, message, source location, and stack trace of an error value in one call.
double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef *exception)
Converts a JavaScript value to number and returns the resulting number.
bool JSValueIsSymbol(JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.15)
Tests whether a JavaScript value's type is the symbol type.
bool JSValueIsNull(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the null type.
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.
JSValueRef JSValueMakeUndefined(JSContextRef ctx)
Creates a JavaScript value of the undefined type.
void JSValueUnprotect(JSContextRef ctx, JSValueRef value)
Unprotects a JavaScript value from garbage collection.
bool JSValueIsObject(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the object type.
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 ...
bool JSValueIsArray(JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.11)
Tests whether a JavaScript value is an array.
bool JSValueIsUndefined(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the undefined type.
JSValueRef JSValueMakeNumber(JSContextRef ctx, double number)
Creates a JavaScript value of the number type.
bool JSValueIsDate(JSContextRef ctx, JSValueRef value) JSC_API_AVAILABLE(macos(10.11)
Tests whether a JavaScript value is a date.
bool JSValueIsString(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the string 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.
JSObjectRef JSValueToObject(JSContextRef ctx, JSValueRef value, JSValueRef *exception)
Converts a JavaScript value to object and returns the resulting object.
JSType
A constant identifying the type of a JSValue.
Definition JSValueRef.h:48
@ kJSTypeNull
Definition JSValueRef.h:50
@ kJSTypeString
Definition JSValueRef.h:53
@ kJSTypeBoolean
Definition JSValueRef.h:51
@ kJSTypeObject
Definition JSValueRef.h:54
@ kJSTypeNumber
Definition JSValueRef.h:52
@ kJSTypeUndefined
Definition JSValueRef.h:49
JSTypedErrorType
A constant identifying the type of a JavaScript error object.
Definition JSValueRef.h:392
@ kJSTypedError_ReferenceError
Definition JSValueRef.h:397
@ kJSTypedError_TypeError
Definition JSValueRef.h:394
@ kJSTypedError_Error
Definition JSValueRef.h:393
@ kJSTypedError_EvalError
Definition JSValueRef.h:398
@ kJSTypedError_SyntaxError
Definition JSValueRef.h:396
@ kJSTypedError_RangeError
Definition JSValueRef.h:395
JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef *exception)
Converts a JavaScript value to string and copies the result into a JavaScript string.
bool JSValueIsEqual(JSContextRef ctx, JSValueRef a, JSValueRef b, JSValueRef *exception)
Tests whether two JavaScript values are equal, as compared by the JS == operator.
JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef string)
Creates a JavaScript value of the string type.
bool JSValueToBoolean(JSContextRef ctx, JSValueRef value)
Converts a JavaScript value to boolean and returns the resulting boolean.
bool JSValueIsBoolean(JSContextRef ctx, JSValueRef value)
Tests whether a JavaScript value's type is the boolean type.
JSTypedArrayType
A constant identifying the Typed Array type of a JSObjectRef.
Definition JSValueRef.h:77
@ kJSTypedArrayTypeUint16Array
Definition JSValueRef.h:83
@ kJSTypedArrayTypeInt32Array
Definition JSValueRef.h:80
@ kJSTypedArrayTypeInt16Array
Definition JSValueRef.h:79
@ kJSTypedArrayTypeNone
Definition JSValueRef.h:88
@ kJSTypedArrayTypeInt8Array
Definition JSValueRef.h:78
@ kJSTypedArrayTypeArrayBuffer
Definition JSValueRef.h:87
@ kJSTypedArrayTypeUint32Array
Definition JSValueRef.h:84
@ kJSTypedArrayTypeBigUint64Array
Definition JSValueRef.h:90
@ kJSTypedArrayTypeUint8ClampedArray
Definition JSValueRef.h:82
@ kJSTypedArrayTypeBigInt64Array
Definition JSValueRef.h:89
@ kJSTypedArrayTypeFloat32Array
Definition JSValueRef.h:85
@ kJSTypedArrayTypeUint8Array
Definition JSValueRef.h:81
@ kJSTypedArrayTypeFloat64Array
Definition JSValueRef.h:86
void JSValueProtect(JSContextRef ctx, JSValueRef value)
Protects a JavaScript value from garbage collection.
JSType JSValueGetType(JSContextRef ctx, JSValueRef value)
Returns a JavaScript value's type.
JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean)
Creates a JavaScript value of the boolean type.
#define JSC_API_AVAILABLE(...)
Definition WebKitAvailability.h:46