TechnologiesDeveloper Tools & Diagnostics

JavaScriptCore

iOSmacOStvOSwatchOSvisionOS

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.

  • Cl
    JSContextiOS 7.0+
    @interface
  • Cl
    JSVirtualMachineiOS 7.0+
    @interface

Exchanging Values 2

The bridged value type and memory-management wrapper used to pass data between native code and JavaScript.

  • Cl
    JSValueiOS 7.0+
    @interface
  • Cl
    JSManagedValueiOS 7.0+
    @interface

Exposing Native Objects 4

The protocol and definitions used to make native classes and their members available to JavaScript.

  • Pr
    JSExport
    @protocol
  • St
    JSClassDefinition
    @struct JSClassDefinition
  • St
    JSStaticValue
    @struct JSStaticValue
  • St
    JSStaticFunction
    @struct JSStaticFunction

Type Information 3

Constants and enumerations that describe JavaScript value types and runtime relationships.

  • St
    JSType
    @enum JSType
  • St
    JSTypedArrayTypeiOS 10.0+
    @enum JSTypedArrayType
  • En
    JSRelationConditioniOS 18.0+
    @enum JSRelationCondition

Type Aliases 25

  • Ty
    JSContextGroupRef
    @typedef JSContextGroupRef A group that associates JavaScript contexts with one another. Contexts in the same group may share and exchange JavaScript objects.
  • Ty
    JSContextRef
    @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state.
  • Ty
    JSGlobalContextRef
    @typedef JSGlobalContextRef A global JavaScript execution context. A JSGlobalContext is a JSContext.
  • Ty
    JSStringRef
    @typedef JSStringRef A UTF16 character buffer. The fundamental string representation in JavaScript.
  • Ty
    JSClassRef
    @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior.
  • Ty
    JSPropertyNameArrayRef
    @typedef JSPropertyNameArrayRef An array of JavaScript property names.
  • Ty
    JSPropertyNameAccumulatorRef
    @typedef JSPropertyNameAccumulatorRef An ordered set used to collect the names of a JavaScript object's properties.
  • Ty
    JSTypedArrayBytesDeallocator
    @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
  • Ty
    JSValueRef
    @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them.
  • Ty
    JSObjectRef
    @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue.
  • Ty
    JSPropertyAttributes
    @typedef JSPropertyAttributes
  • Ty
    JSClassAttributes
    @typedef JSClassAttributes
  • Ty
    JSObjectInitializeCallback
    @typedef JSObjectInitializeCallback
  • Ty
    JSObjectFinalizeCallback
    @typedef JSObjectFinalizeCallback
  • Ty
    JSObjectHasPropertyCallback
    @typedef JSObjectHasPropertyCallback
  • Ty
    JSObjectGetPropertyCallback
    @typedef JSObjectGetPropertyCallback
Show 9 more
  • Ty
    JSObjectSetPropertyCallback
    @typedef JSObjectSetPropertyCallback
  • Ty
    JSObjectDeletePropertyCallback
    @typedef JSObjectDeletePropertyCallback
  • Ty
    JSObjectGetPropertyNamesCallback
    @typedef JSObjectGetPropertyNamesCallback
  • Ty
    JSObjectCallAsFunctionCallback
    @typedef JSObjectCallAsFunctionCallback
  • Ty
    JSObjectCallAsConstructorCallback
    @typedef JSObjectCallAsConstructorCallback
  • Ty
    JSObjectHasInstanceCallback
    @typedef JSObjectHasInstanceCallback
  • Ty
    JSObjectConvertToTypeCallback
    @typedef JSObjectConvertToTypeCallback
  • Ty
    JSChar
    @typedef JSChar
  • Ty
    JSValueProperty
← Developer Tools & Diagnostics