JavaScriptCore evaluates JavaScript and bridges values, contexts, and objects between Swift or Objective-C and the WebKit JavaScript engine. You run script in a JSContext, exchange data through JSValue, and manage execution and memory with a JSVirtualMachine and JSManagedValue. To expose native objects to JavaScript, you adopt the JSExport protocol or describe a class with JSClassDefinition, JSStaticValue, and JSStaticFunction.
Evaluating JavaScript 2
The execution environment and virtual machine in which you run JavaScript code.
- ClJSContextiOS 7.0+@interface
- ClJSVirtualMachineiOS 7.0+@interface
Exchanging Values 2
The bridged value type and memory-management wrapper used to pass data between native code and JavaScript.
- ClJSValueiOS 7.0+@interface
- ClJSManagedValueiOS 7.0+@interface
Exposing Native Objects 4
The protocol and definitions used to make native classes and their members available to JavaScript.
- PrJSExport@protocol
- StJSClassDefinition@struct JSClassDefinition
- StJSStaticValue@struct JSStaticValue
- StJSStaticFunction@struct JSStaticFunction
Type Information 3
Constants and enumerations that describe JavaScript value types and runtime relationships.
- StJSType@enum JSType
- StJSTypedArrayTypeiOS 10.0+@enum JSTypedArrayType
- EnJSRelationConditioniOS 18.0+@enum JSRelationCondition
Type Aliases 25
- TyJSContextGroupRef@typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
- TyJSContextRef@typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state.
- TyJSGlobalContextRef@typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext.
- TyJSStringRef@typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript.
- TyJSClassRef@typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior.
- TyJSPropertyNameArrayRef@typedef JSPropertyNameArrayRef An array of JavaScript property names.
- TyJSPropertyNameAccumulatorRef@typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object's properties.
- TyJSTypedArrayBytesDeallocator@typedef 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 ori
- TyJSValueRef@typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them.
- TyJSObjectRef@typedef JSObjectRef A JavaScript object. A JSObject is a JSValue.
- TyJSPropertyAttributes@typedef JSPropertyAttributes
- TyJSClassAttributes@typedef JSClassAttributes
- TyJSObjectInitializeCallback@typedef JSObjectInitializeCallback
- TyJSObjectFinalizeCallback@typedef JSObjectFinalizeCallback
- TyJSObjectHasPropertyCallback@typedef JSObjectHasPropertyCallback
- TyJSObjectGetPropertyCallback@typedef JSObjectGetPropertyCallback
Show 9 more
- TyJSObjectSetPropertyCallback@typedef JSObjectSetPropertyCallback
- TyJSObjectDeletePropertyCallback@typedef JSObjectDeletePropertyCallback
- TyJSObjectGetPropertyNamesCallback@typedef JSObjectGetPropertyNamesCallback
- TyJSObjectCallAsFunctionCallback@typedef JSObjectCallAsFunctionCallback
- TyJSObjectCallAsConstructorCallback@typedef JSObjectCallAsConstructorCallback
- TyJSObjectHasInstanceCallback@typedef JSObjectHasInstanceCallback
- TyJSObjectConvertToTypeCallback@typedef JSObjectConvertToTypeCallback
- TyJSChar@typedef JSChar
- TyJSValueProperty